diff --git a/class/dashboard/layout.php b/class/dashboard/layout.php
index 3737952..b01be16 100644
--- a/class/dashboard/layout.php
+++ b/class/dashboard/layout.php
@@ -207,7 +207,7 @@ abstract class MCI_Footnotes_LayoutEngine {
'mci-footnotes-admin-styles',
plugins_url('../../css/settings.css', __FILE__),
'',
- '2.1.4d0'
+ '2.1.4d1'
);
// UPDATE version # when making changes to settings.css, FOR CACHE BUSTING
diff --git a/class/init.php b/class/init.php
index 6d3489d..0a2c67e 100644
--- a/class/init.php
+++ b/class/init.php
@@ -160,7 +160,7 @@ class MCI_Footnotes {
'mci-footnotes-css-public',
plugins_url('../css/public.css', __FILE__),
'',
- '2.1.4d0'
+ '2.1.4d1'
);
}
diff --git a/class/task.php b/class/task.php
index 5b900d0..405310e 100644
--- a/class/task.php
+++ b/class/task.php
@@ -19,7 +19,7 @@
* 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
*
- * Last modified: 2020-11-25T0837+0100
+ * Last modified: 2020-11-26T0036+0100
*/
// If called directly, abort:
@@ -448,7 +448,7 @@ class MCI_Footnotes_Task {
// to prevent them from hanging out of the tooltip in non-Unicode-compliant user agents
// spare however values of the href argument!
// see public.css
- $l_str_FootnoteText = preg_replace( '#(?$1', $l_str_FootnoteText );
+ $l_str_FootnoteText = preg_replace( '#(?$1', $l_str_FootnoteText );
// Text to be displayed instead of the footnote
$l_str_FootnoteReplaceText = "";
@@ -479,21 +479,26 @@ class MCI_Footnotes_Task {
// define the HTML element to use for the referrers:
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS))) {
- $l_str_Element = 'sup';
+ $l_str_SupSpan = 'sup';
} else {
- $l_str_Element = 'span';
+ $l_str_SupSpan = 'span';
}
+ // determine whether the link element is used, see below
+
+
// fill in 'templates/public/footnote.html':
$l_obj_Template->replace(
array(
- "post_id" => $l_int_PostId,
- "id" => $l_int_Index,
- "element" => $l_str_Element,
- "before" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE),
- "index" => $l_int_Index,
- "after" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER),
- "text" => MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)) ? $l_str_ExcerptText : "",
+ "post_id" => $l_int_PostId,
+ "id" => $l_int_Index,
+ "link-start" => '',
+ "link-end" => '',
+ "sup-span" => $l_str_SupSpan,
+ "before" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE),
+ "index" => $l_int_Index,
+ "after" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER),
+ "text" => MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)) ? $l_str_ExcerptText : "",
)
);
$l_str_FootnoteReplaceText = $l_obj_Template->getContent();
@@ -551,16 +556,52 @@ class MCI_Footnotes_Task {
*/
public function ReferenceContainer() {
- // post ID to make everything unique wrt infinite scroll and archive view:
- global $l_int_PostId;
- $l_int_PostId = get_the_id();
-
- // no footnotes has been replaced on this page
+ // no footnotes have been replaced on this page:
if (empty(self::$a_arr_Footnotes)) {
return "";
}
+ /**
+ * INFINITE SCROLL / AUTOLOAD, ARCHIVE VIEW
+ *
+ * Multiple posts are appended to each other, functions and IDs must be disambiguated.
+ * Contributed by @docteurfitness