development 2.2.0d0 merged with 2.1.4d series. Scroll offset and duration settings
git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2432050 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
c432dde37b
commit
3e8d312969
12 changed files with 124 additions and 171 deletions
|
@ -17,14 +17,15 @@
|
|||
* 2.1.1 options fixing ref container layout and referrer vertical alignment 2020-11-16T2024+0100
|
||||
* 2.1.1 option fixing ref container relative position 2020-11-17T0254+0100
|
||||
* 2.1.2 options for the other hooks 2020-11-19T1849+0100
|
||||
* 2.1.4 fix line wrapping of URLs based on pattern, not link element 2020-11-25T0837+0100
|
||||
* 2.1.4 fix issues with link elements by making them optional 2020-11-26T1051+0100
|
||||
* 2.1.4 support appending arrow when combining identicals is on 2020-11-26T1633+0100
|
||||
* 2.1.4 disable or select backlink separator and terminator 2020-11-28T1048+0100
|
||||
* 2.1.4 optional line breaks to stack enumerated backlinks 2020-11-28T1049+0100
|
||||
* 2.1.4 ref container column width and tooltip font size settings 2020-12-03T0954+0100
|
||||
* 2.2.0 fix line wrapping of URLs based on pattern, not link element 2020-11-25T0837+0100
|
||||
* 2.2.0 fix issues with link elements by making them optional 2020-11-26T1051+0100
|
||||
* 2.2.0 support appending arrow when combining identicals is on 2020-11-26T1633+0100
|
||||
* 2.2.0 disable or select backlink separator and terminator 2020-11-28T1048+0100
|
||||
* 2.2.0 optional line breaks to stack enumerated backlinks 2020-11-28T1049+0100
|
||||
* 2.2.0 ref container column width and tooltip font size settings 2020-12-03T0954+0100
|
||||
* 2.2.0 scroll offset and duration settings 2020-12-05T0538+0100
|
||||
*
|
||||
* Last modified: 2020-12-03T1623+0100
|
||||
* Last modified: 2020-12-05T0538+0100
|
||||
*/
|
||||
|
||||
// If called directly, abort:
|
||||
|
@ -665,7 +666,7 @@ class MCI_Footnotes_Task {
|
|||
* The link elements have been added and are present @since 2.0.0.
|
||||
* Then the link addresses were removed @since 2.0.4.
|
||||
* Then the presence of <a> elements was made optional
|
||||
* @since 2.1.4
|
||||
* @since 2.2.0
|
||||
* 2020-11-25T1306+0100
|
||||
*/
|
||||
$l_str_LinkSpan = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED)) ? 'a' : 'span';
|
||||
|
@ -711,7 +712,7 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* Initially a comma was appended in this algorithm for enumerations.
|
||||
* The comma in enumerations is not generally preferred.
|
||||
* @since 2.1.4 the separator is optional, has options, and is customizable:
|
||||
* @since 2.2.0 the separator is optional, has options, and is customizable:
|
||||
*/
|
||||
// check if it is even enabled:
|
||||
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED))) {
|
||||
|
@ -736,7 +737,7 @@ class MCI_Footnotes_Task {
|
|||
* Initially a dot was appended in the table row template.
|
||||
* @since 2.0.6 a dot after footnote numbers is discarded as not localizable;
|
||||
* making it optional was envisaged.
|
||||
* @since 2.1.4 the terminator is optional, has options, and is customizable:
|
||||
* @since 2.2.0 the terminator is optional, has options, and is customizable:
|
||||
*/
|
||||
// check if it is even enabled:
|
||||
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED))) {
|
||||
|
@ -965,15 +966,21 @@ class MCI_Footnotes_Task {
|
|||
|
||||
}
|
||||
|
||||
// get scroll offset and duration settings:
|
||||
$l_int_ScrollOffset = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET);
|
||||
$l_int_ScrollDuration = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION);
|
||||
|
||||
// load 'templates/public/reference-container.html':
|
||||
$l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container");
|
||||
$l_obj_TemplateContainer->replace(
|
||||
array(
|
||||
"post_id" => $l_int_PostId,
|
||||
"label" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME),
|
||||
"button-style" => !MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)) ? 'display: none;' : '',
|
||||
"style" => MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)) ? 'display: none;' : '',
|
||||
"content" => $l_str_Body,
|
||||
"post_id" => $l_int_PostId,
|
||||
"label" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME),
|
||||
"button-style" => !MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)) ? 'display: none;' : '',
|
||||
"style" => MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)) ? 'display: none;' : '',
|
||||
"content" => $l_str_Body,
|
||||
"scroll-offset" => ($l_int_ScrollOffset / 100),
|
||||
"scroll-duration" => $l_int_ScrollDuration,
|
||||
)
|
||||
);
|
||||
|
||||
|
|
Reference in a new issue