From 47a5155707ab5888d60665ea309a15f6da699f3c Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Fri, 25 Dec 2020 23:00:23 +0000 Subject: [PATCH] urgent bugfix release 2.2.10 in response to forum git-svn-id: https://plugins.svn.wordpress.org/footnotes/tags/2.2.10@2446030 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/dashboard/subpage-main.php | 58 +++-- class/language.php | 8 +- class/settings.php | 76 +++--- class/task.php | 226 ++++++++++++------ css/public.css | 6 +- css/settings.css | 4 +- footnotes.php | 4 +- readme.txt | 15 +- .../settings-reference-container.html | 4 + templates/public/footnote-alternative.html | 12 +- templates/public/footnote.html | 6 +- .../reference-container-body-3column.html | 8 +- .../reference-container-body-combi.html | 2 +- .../reference-container-body-switch.html | 6 +- .../public/reference-container-body.html | 6 +- templates/public/reference-container.html | 32 +-- templates/public/tooltip.html | 4 +- 17 files changed, 295 insertions(+), 182 deletions(-) diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php index 1ed2502..9e5092a 100644 --- a/class/dashboard/subpage-main.php +++ b/class/dashboard/subpage-main.php @@ -6,28 +6,30 @@ * @author Stefan Herndler * @since 1.5.0 14.09.14 14:47 * - * Edited for: - * 2.0.4 restore arrow settings 2020-11-01T0509+0100 - * 2.1.0 read-on button label 2020-11-08T2148+0100 - * 2.1.1 options for ref container and alternative tooltips 2020-11-16T2152+0100 - * 2.1.2 priority level settings for all other hooks, thanks to @nikelaos + * Edited: + * @since 2.0.4 restore arrow settings 2020-11-01T0509+0100 + * @since 2.1.0 read-on button label 2020-11-08T2148+0100 + * @since 2.1.1 options for ref container and alternative tooltips 2020-11-16T2152+0100 + * @since 2.1.2 priority level settings for all other hooks, thanks to @nikelaos * @see - * 2.1.4 settings for ref container, tooltips and scrolling 2020-12-03T0950+0100 - * 2.1.6 slight UI reordering 2020-12-09T1114+0100 - * 2.1.6 option to disable URL line wrapping 2020-12-09T1604+0100 - * 2.1.6 remove expert mode setting as outdated 2020-12-09T2105+0100 - * 2.2.0 start/end short codes: more predefined options, thanks to @nikelaos + * @since 2.1.4 settings for ref container, tooltips and scrolling 2020-12-03T0950+0100 + * @since 2.1.6 slight UI reordering 2020-12-09T1114+0100 + * @since 2.1.6 option to disable URL line wrapping 2020-12-09T1604+0100 + * @since 2.1.6 remove expert mode setting as outdated 2020-12-09T2105+0100 + * @since 2.2.0 start/end short codes: more predefined options, thanks to @nikelaos * @see - * 2.2.0 add options, redistribute, update strings 2020-12-12T2135+0100 - * 2.2.0 shortcode for reference container custom position 2020-12-13T2055+0100 - * 2.2.2 Custom CSS settings container migration 2020-12-15T0709+0100 - * 2.2.4 move backlink symbol selection under previous tab 2020-12-16T1244+0100 - * 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2021+0100 + * @since 2.2.0 add options, redistribute, update strings 2020-12-12T2135+0100 + * @since 2.2.0 shortcode for reference container custom position 2020-12-13T2055+0100 + * @since 2.2.2 Custom CSS settings container migration 2020-12-15T0709+0100 + * @since 2.2.4 move backlink symbol selection under previous tab 2020-12-16T1244+0100 + * @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2021+0100 * @see - * 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 + * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 * @see + * @since 2.2.10 reference container row border option, thanks to @noobishh 2020-12-25T2316+0100 + * @see * - * Last modified: 2020-12-20T0533+0100 + * Last modified: 2020-12-25T2336+0100 */ /** @@ -79,11 +81,11 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { * @return array * * Edited: - * 2.1.6 tabs reordered and renamed + * @since 2.1.6 tabs reordered and renamed * @see customization vs configuration * * - * 2.1.6 removed if statement around expert tab + * @since 2.1.6 removed if statement around expert tab */ protected function getSections() { $l_arr_Tabs = array(); @@ -160,7 +162,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { * * Completed: * @since 2.1.4: layout and typography options 2020-11-30T0548+0100 - * 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 + * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 * @see */ public function ReferenceContainer() { @@ -232,6 +234,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { "label-border" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, __("Border under the heading:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "border" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER, $l_arr_Enabled), + "label-row-borders" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, __("Borders around the table rows:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "row-borders" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE, $l_arr_Enabled), + "label-collapse" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, __("Collapse by default:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "collapse" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, $l_arr_Enabled), @@ -491,7 +496,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { * * Edited heading 2020-12-12T1453+0100 * @since 2.1.1 more settings and notices, thanks to @nikelaos - * @see + * @see * @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100 */ public function Excerpts() { @@ -808,12 +813,12 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { * @since 1.5.0 * * Edited: - * 2.1.6 drop localized notices for CSS classes as the number increased to 16 + * @since 2.1.6 drop localized notices for CSS classes as the number increased to 16 * list directly in the template, as CSS is in English anyway - * @see templates/dashboard/customize-css.html + * @see templates/dashboard/customize-css.html * 2020-12-09T1113+0100 * - * 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100 + * @since 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100 */ public function CustomCSS() { // load template file @@ -896,6 +901,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { * empty should be interpreted as PHP_INT_MAX, * but a numbox cannot be set to empty: * define -1 as PHP_INT_MAX instead + * + * @since 2.2.9 removed the warning about the widget text hook 2020-12-25T0348+0100 + * @since 2.2.9 added guidance for the widget text hook 2020-12-25T0353+0100 */ public function LookupHooks() { // load template file @@ -908,7 +916,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { "description-1" => __('The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "description-2" => sprintf(__('For the_content, this figure must be lower than %1$d so that certain strings added by a plugin running at %1$d may not be mistaken as a footnote. This makes also sure that the reference container displays above a feature inserted by a plugin running at %2$d.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 99, 1200), "description-3" => sprintf(__('%1$d is lowest priority, %2$d is highest. To set priority level to lowest, set it to %3$d, interpreted as %1$d, the constant %4$s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), PHP_INT_MAX, 0, -1, 'PHP_INT_MAX'), - "description-4" => __('The widget_text hook must be disabled, because a reference container is inserted at the bottom of each widget with footnotes, but multiple containers in a page are not functional.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "description-4" => __('The widget_text hook must be enabled either when footnotes are present in theme text widgets, or when Elementor accordions or toggles shall have a reference container per section. If they should not, this hook must be disabled.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "head-hook" => __("WordPress hook function name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "head-checkbox" => __("Activate", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), diff --git a/class/language.php b/class/language.php index 4e4cf6c..4ecdf19 100644 --- a/class/language.php +++ b/class/language.php @@ -6,10 +6,10 @@ * @since 1.5.0 14.09.14 17:47 * * Edited for: - * 2.0.0 PHP-related bug fix thanks to MatKus (@matkus) 2020-10-26T1609+0100 + * 2.0.0 PHP-related bug fix thanks to @matkus 2020-10-26T1609+0100 * 2.1.6 conform to WordPress plugin language file name scheme 2020-12-08T1931+0100 * - * Last modified: 2020-12-11T1449+0100 + * Last modified: 2020-12-25T0344+0100 */ /** @@ -35,7 +35,7 @@ class MCI_Footnotes_Language { * @author Stefan Herndler * @since 1.5.0 * - * @since 2.0.0 PHP 7.1 related bug fix thanks to MatKus (@matkus) + * @since 2.0.0 PHP 7.1 related bug fix thanks to @matkus * @see * @see */ @@ -46,7 +46,7 @@ class MCI_Footnotes_Language { // 2020-10-26T1609+0100 return; } - // fallback to english + // fall back to British English: self::load("en_GB"); } diff --git a/class/settings.php b/class/settings.php index 3f4a07e..17f42bc 100644 --- a/class/settings.php +++ b/class/settings.php @@ -6,32 +6,35 @@ * @author Stefan Herndler * @since 1.5.0 14.09.14 10:43 * - * Edited for: - * 2.0.4 restore arrow settings 2020-11-02T2115+0100 - * 2.0.7 remove hook the_post 2020-11-06T1342+0100 - * 2.1.0 add read-on button label customization 2020-11-08T2149+0100 - * 2.1.1 fix tooltips on site by alternative 2020-11-11T1819+0100 - * 2.1.1 fix disabling backlink symbol 2020-11-16T2021+0100 - * 2.1.1 fix superscript by making it optional - * 2.1.1 fix start pages by option to hide ref container, thanks to @dragon013 + * Edited: + * @since 2.0.4 restore arrow settings 2020-11-02T2115+0100 + * @since 2.0.7 remove hook the_post 2020-11-06T1342+0100 + * @since 2.1.0 add read-on button label customization 2020-11-08T2149+0100 + * @since 2.1.1 fix tooltips on site by alternative 2020-11-11T1819+0100 + * @since 2.1.1 fix disabling backlink symbol 2020-11-16T2021+0100 + * @since 2.1.1 fix superscript by making it optional + * @since 2.1.1 fix start pages by option to hide ref container, thanks to @dragon013 * @see - * 2.1.1 fix ref container by option restoring 3-column layout - * 2.1.1 fix ref container by option to switch index/symbol 2020-11-16T2022+0100 + * @since 2.1.1 fix ref container by option restoring 3-column layout + * @since 2.1.1 fix ref container by option to switch index/symbol 2020-11-16T2022+0100 * @since 2.1.3 excerpt hook: disable by default, thanks to @nikelaos * @see - * 2.1.3 fix ref container positioning by priority level 2020-11-17T0205+0100 - * 2.1.4 more settings container keys 2020-12-03T0955+0100 - * 2.1.6 option to disable URL line wrapping 2020-12-09T1606+0100 - * 2.1.6 set default priority level of the_content to 98 to prevent plugin conflict, thanks to @marthalindeman 2020-12-10T0447+0100 - * 2.2.0 reference container custom position shortcode, thanks to @hamshe 2020-12-13T2056+0100 + * @since 2.1.3 fix ref container positioning by priority level 2020-11-17T0205+0100 + * @since 2.1.4 more settings container keys 2020-12-03T0955+0100 + * @since 2.1.6 option to disable URL line wrapping 2020-12-09T1606+0100 + * @since 2.1.6 set default priority level of the_content to 98 to prevent plugin conflict, thanks to @marthalindeman 2020-12-10T0447+0100 + * @since 2.2.0 reference container custom position shortcode, thanks to @hamshe 2020-12-13T2056+0100 * @see - * 2.2.2 Custom CSS settings container migration 2020-12-15T0709+0100 - * 2.2.4 move backlink symbol selection under previous tab 2020-12-16T1256+0100 - * 2.2.5 alternative tooltip position settings 2020-12-17T0907+0100 - * 2.2.5 options for reference container label element and bottom border, thanks to @markhillyer 2020-12-18T1455+0100 + * @since 2.2.2 Custom CSS settings container migration 2020-12-15T0709+0100 + * @since 2.2.4 move backlink symbol selection under previous tab 2020-12-16T1256+0100 + * @since 2.2.5 alternative tooltip position settings 2020-12-17T0907+0100 + * @since 2.2.5 options for reference container label element and bottom border, thanks to @markhillyer 2020-12-18T1455+0100 * @see + * @since 2.2.9 set default priority level of widget_text to 98 like for the_content (since 2.1.6), thanks to @marthalindeman 2020-12-25T1646+0100 + * @since 2.2.10 reference container row border option, thanks to @noobishh 2020-12-25T2316+0100 + * @see * - * Last modified: 2020-12-23T0747+0100 + * Last modified: 2020-12-25T2336+0100 */ @@ -331,7 +334,7 @@ class MCI_Footnotes_Settings { * @var string * * Edited: - * 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0520+0100 + * @since 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0520+0100 */ const C_STR_CUSTOM_CSS = "footnote_inputfield_custom_css"; const C_STR_CUSTOM_CSS_NEW = "footnote_inputfield_custom_css_new"; @@ -399,7 +402,7 @@ class MCI_Footnotes_Settings { * @var string * * 2020-11-16T0859+0100 - * + * * option to enable/disable the superscript element for referrers, thanks to @cwbayer * @see */ @@ -524,6 +527,18 @@ class MCI_Footnotes_Settings { const C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT = "footnotes_inputfield_reference_container_label_element"; const C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER = "footnotes_inputfield_reference_container_label_bottom_border"; + /** + * Settings Container Key for table cell borders, thanks to @noobishh + * @see + * + * @since 2.2.10 + * @var bool + * + * 2020-12-25T2311+0100 + */ + const C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE = "footnotes_inputfield_reference_container_row_borders_enable"; + + /** * Stores a singleton reference of this class. * @@ -558,9 +573,9 @@ class MCI_Footnotes_Settings { * @author Stefan Herndler * @since 1.5.0 * @var array - * + * * Edited multiple times. - * + * * @since 2.1.3 excerpt hook: disable by default, thanks to @nikelaos * @see */ @@ -591,6 +606,9 @@ class MCI_Footnotes_Settings { // whether to enqueue additional style sheet: self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', + // table cell borders: + self::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no', + // backlink symbol: self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', @@ -750,14 +768,14 @@ class MCI_Footnotes_Settings { // interpret -1 as PHP_INT_MAX instead self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, - // Priority level of the_content, as the only relevant priority level - // must be less than 99 because social buttons may yield scripts that - // contain the strings '((' and '))', i.e. the default footnote start - // and end short codes, causing issues with fake footnotes. + // Priority level of the_content and of widget_text as the only relevant + // hooks must be less than 99 because social buttons may yield scripts + // that contain the strings '((' and '))', i.e. the default footnote + // start and end short codes, causing issues with fake footnotes. self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, - self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => PHP_INT_MAX, + self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98, ), diff --git a/class/task.php b/class/task.php index edf4d25..8a170a3 100644 --- a/class/task.php +++ b/class/task.php @@ -46,11 +46,20 @@ * @see * @since 2.2.6 URL wrap: make the quotation mark optional in the exclusion regex, thanks to @spiralofhope2 2020-12-23T0409+0100 * @see - * @since 2.2.7 revert that change in the exclusion regex, thanks to @rjl20 and @spaceling 2020-12-23T1046+0100 + * @since 2.2.7 revert that change in the exclusion regex, thanks to @rjl20, @spaceling, @friedrichnorth, @bernardzit 2020-12-23T1046+0100 * @see - * @since 2.2.8 correct lookbehind by duplicating it with and without quotation mark class 2020-12-23T1108+0100 + * @see + * @since 2.2.8 URL wrap: correct lookbehind by duplicating it with and without quotation mark class 2020-12-23T1108+0100 + * @since 2.2.9 URL wrap: account for RFC 2396 allowed characters in parameter names 2020-12-24T1956+0100 + * @see + * @since 2.2.9 Reference containers, widget_text hook: support for multiple containers in a page, thanks to @justbecuz 2020-12-25T0338+0100 + * @see + * @since 2.2.9 URL wrap: exclude URLs also where the equals sign is preceded by an entity or character reference 2020-12-25T1251+0100 + * @since 2.2.10 URL wrap: support also file transfer protocol URLs 2020-12-25T2220+0100 + * @since 2.2.10 Reference container: add option for table borders to revert 2.0.0/2.0.1 change made on user request, thanks to @noobishh 2020-12-25T2304+0100 + * @see * - * Last modified: 2020-12-23T1108+0100 + * Last modified: 2020-12-25T2352+0100 */ // If called directly, abort: @@ -91,6 +100,37 @@ class MCI_Footnotes_Task { */ public static $a_str_Prefix = ""; + /** + * INFINITE SCROLL / AUTOLOAD, ARCHIVE VIEW + * + * Multiple posts are appended to each other, functions and note IDs must be disambiguated. + * + * Contribution thankfully received from @docteurfitness + * @see + * @since 2.0.5 + * @var int + * + * post ID to make everything unique wrt infinite scroll and archive view: + * (will be filled in by the next possible occasion; PHP seems to prohibit doing so here) + */ + public static $l_int_PostId = ''; + + /** + * Reference container ID + * + * This ID disambiguates multiple reference containers in a page + * as they may occur when the widget_text hook is active and the page + * is built with Elementor and has an accordion or similar toggle sections. + * + * Is incremented each time after a reference container is inserted. + * + * Thanks to @justbecuz + * @see + * @since 2.2.9 + * @var int + */ + public static $l_int_ReferenceContainerId = 1; + /** * Register WordPress Hooks to replace Footnotes in the content of a public page. * @@ -183,7 +223,7 @@ class MCI_Footnotes_Task { */ public function wp_head() { - // no switch out to insert start tag: + // insert start tag without switching out of PHP: echo "\r\n\r\n"; // alternative tooltip script printed formatted not minified: @@ -543,13 +590,13 @@ class MCI_Footnotes_Task { * @see */ public function exec($p_str_Content, $p_bool_OutputReferences = false, $p_bool_HideFootnotesText = false) { + // replace all footnotes in the content, settings are converted to html characters $p_str_Content = $this->search($p_str_Content, true, $p_bool_HideFootnotesText); // replace all footnotes in the content, settings are NOT converted to html characters $p_str_Content = $this->search($p_str_Content, false, $p_bool_HideFootnotesText); - // append the reference container - // or insert at shortcode: added for 2.2.0, thanks to @hamshe + // append the reference container or insert at shortcode: $l_str_ReferenceContainerPositionShortcode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE); if ($p_bool_OutputReferences) { @@ -563,6 +610,9 @@ class MCI_Footnotes_Task { $p_str_Content .= $this->ReferenceContainer(); } + + // increment the container ID: + self::$l_int_ReferenceContainerId++; } // delete position shortcode should any remain e.g. when ref container is in footer, thanks to @hamshe: @@ -573,7 +623,7 @@ class MCI_Footnotes_Task { self::$a_bool_AllowLoveMe = false; $p_str_Content = str_replace(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG, "", $p_str_Content); } - // return the content with replaced footnotes and optional reference container append + // return the content with replaced footnotes and optional reference container appended: return $p_str_Content; } @@ -586,12 +636,13 @@ class MCI_Footnotes_Task { * @param bool $p_bool_ConvertHtmlChars html encode settings, default true. * @param bool $p_bool_HideFootnotesText Hide footnotes found in the string. * @return string + * + * Edited since 2.0.0 */ public function search($p_str_Content, $p_bool_ConvertHtmlChars, $p_bool_HideFootnotesText) { // post ID to make everything unique wrt infinite scroll and archive view - global $l_int_PostId; - $l_int_PostId = get_the_id(); + self::$l_int_PostId = get_the_id(); // contains the index for the next footnote on this page $l_int_FootnoteIndex = count(self::$a_arr_Footnotes) + 1; @@ -631,7 +682,7 @@ class MCI_Footnotes_Task { // search footnotes short codes in the content do { - // get first occurrence of the footnote short code [start] + // get first occurrence of the footnote start tag short code: $i_int_len_Content = strlen($p_str_Content); if ($l_int_PosStart > $i_int_len_Content) $l_int_PosStart = $i_int_len_Content; $l_int_PosStart = strpos($p_str_Content, $l_str_StartingTag, $l_int_PosStart); @@ -639,7 +690,7 @@ class MCI_Footnotes_Task { if ($l_int_PosStart === false) { break; } - // get first occurrence of a footnote short code [end] + // get first occurrence of the footnote end tag short code: $l_int_PosEnd = strpos($p_str_Content, $l_str_EndingTag, $l_int_PosStart); // no short code found, stop here if ($l_int_PosEnd === false) { @@ -651,33 +702,38 @@ class MCI_Footnotes_Task { // get footnote text $l_str_FootnoteText = substr($p_str_Content, $l_int_PosStart + strlen($l_str_StartingTag), $l_int_Length - strlen($l_str_StartingTag)); - + /** * URL line wrap - * + * * Fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element, * to prevent them from hanging out of the tooltip in non-Unicode-compliant user agents. * @see public.css - * + * * spare however values of the href and the src arguments! * @since 2.1.5 exclude image source too, thanks to @bjrnet21 * @see - * + * * Even ARIA labels may take a URL as value, so use \w=[\'"] as a catch-all 2020-12-10T1005+0100 * @since 2.1.6 add catch-all exclusion to fix URL line wrapping, thanks to @a223123131 2020-12-09T1921+0100 * @see - * + * * @since 2.1.6 option to disable URL line wrapping 2020-12-09T1606+0100 - * + * * URLs may be a query string in a URL: * @since 2.2.6 make the quotation mark optional in the exclusion regex, thanks to @spiralofhope2 2020-12-23T0409+0100 * @see - * @since 2.2.7 revert that change in the exclusion regex, thanks to @rjl20 and @spaceling 2020-12-23T1046+0100 + * @since 2.2.7 revert that change in the exclusion regex, thanks to @rjl20, @spaceling, @friedrichnorth, @bernardzit 2020-12-23T1046+0100 * @see - * @since 2.2.8 correct lookbehind by duplicating it with and without quotation mark class 2020-12-23T1107+0100 + * @see + * @since 2.2.8 correct lookbehind by duplicating it with and without quotation mark class 2020-12-23T1107+0100 + * @since 2.2.9 account for RFC 2396 allowed characters in parameter names 2020-12-24T1956+0100 + * @see + * @since 2.2.9 exclude URLs also where the equals sign is preceded by an entity or character reference 2020-12-25T1234+0100 + * @since 2.2.10 support also file transfer protocol URLs 2020-12-25T2220+0100 */ if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED))) { - $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 @@ -687,7 +743,7 @@ class MCI_Footnotes_Task { if (!$p_bool_HideFootnotesText) { $l_int_Index = MCI_Footnotes_Convert::Index($l_int_FootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); - // display only an excerpt of the footnotes text if enabled + // display only a truncated footnote text if option enabled: $l_str_ExcerptText = $l_str_FootnoteText; $l_bool_EnableExcerpt = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED)); $l_int_MaxLength = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH)); @@ -699,8 +755,10 @@ class MCI_Footnotes_Task { $l_str_ExcerptText = substr($l_str_ExcerptText, 0, strrpos($l_str_ExcerptText, ' ')); $l_str_ExcerptText .= ' … '; $l_str_ExcerptText .= ''; $l_str_ExcerptText .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL); $l_str_ExcerptText .= ''; @@ -721,15 +779,16 @@ class MCI_Footnotes_Task { // fill in 'templates/public/footnote.html': $l_obj_Template->replace( array( - "post_id" => $l_int_PostId, - "id" => $l_int_Index, - "link-start" => $l_str_LinkSpan == 'a' ? '' : '', - "link-end" => $l_str_LinkSpan == 'a' ? '' : '', - "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 : "", + "post_id" => self::$l_int_PostId, + "container_id" => self::$l_int_ReferenceContainerId, + "note_id" => $l_int_Index, + "link-start" => $l_str_LinkSpan == 'a' ? '' : '', + "link-end" => $l_str_LinkSpan == 'a' ? '' : '', + "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(); @@ -740,8 +799,8 @@ class MCI_Footnotes_Task { MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)) && !MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE)) ) { - $l_int_OffsetY = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y)); - $l_int_OffsetX = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X)); + $l_int_OffsetY = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y)); + $l_int_OffsetX = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X)); $l_int_FadeInDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY )); $l_int_FadeInDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION )); $l_int_FadeOutDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY )); @@ -750,8 +809,9 @@ class MCI_Footnotes_Task { // fill in 'templates/public/tooltip.html': $l_obj_TemplateTooltip->replace( array( - "post_id" => $l_int_PostId, - "id" => $l_int_Index, + "post_id" => self::$l_int_PostId, + "container_id" => self::$l_int_ReferenceContainerId, + "note_id" => $l_int_Index, "position" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION), "offset-y" => !empty($l_int_OffsetY) ? $l_int_OffsetY : 0, "offset-x" => !empty($l_int_OffsetX) ? $l_int_OffsetX : 0, @@ -801,19 +861,6 @@ class MCI_Footnotes_Task { return ""; } - /** - * INFINITE SCROLL / AUTOLOAD, ARCHIVE VIEW - * - * Multiple posts are appended to each other, functions and IDs must be disambiguated. - * Contributed by @docteurfitness - * @see - * @since 2.0.5 - * - * post ID to make everything unique wrt infinite scroll and archive view: - */ - global $l_int_PostId; - $l_int_PostId = get_the_id(); - /** * OPTIONAL LINK ELEMENT FOR FOOTNOTE REFERRERS AND BACKLINKS @@ -832,11 +879,12 @@ class MCI_Footnotes_Task { * Browsers may need to be prevented from logging these clicks in the browsing history, * as logging compromises the usability of the 'return to previous' button in browsers. * For that purpose, and for scroll animation, this linking is performed by JavaScript. - * * - * @since 2.0.0 the link elements have been added and are present. - * @since 2.0.4 the link addresses were removed. - * @since 2.1.4 the presence of elements was made optional, 2020-11-25T1306+0100 + * + * @since 2.0.0 added the link elements with hard links + * @since 2.0.4 removed the hard links on user request + * @see + * @since 2.1.4 made link elements optional, 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'; @@ -844,11 +892,11 @@ class MCI_Footnotes_Task { /** * FOOTNOTE INDEX BACKLINK SYMBOL * - * The backlink symbol has been removed for 2.0.0 along with column 2 of the reference container. - * On user request, an arrow is prepended @since 2.0.3, and the setting is restored @since 2.0.4. - * @since 2.1.1 a select box allows to disable the symbol instead of customizing it to invisible. + * @since 2.0.0 removed backlink symbol along with column 2 of the reference container + * @since 2.0.3 prepended an arrow on user request + * @since 2.0.4 restored the arrow select & symbol input setting + * @since 2.1.1 made the symbol optional instead of customizing it to invisible */ - // check if arrow is enabled: if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE))) { // get html arrow @@ -883,11 +931,15 @@ class MCI_Footnotes_Task { * The comma in enumerations is not generally preferred. * @since 2.1.4 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))) { + // if so, check if it is customized: $l_str_Separator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM); + if (empty($l_str_Separator)) { + // if it is not, check which option is on: $l_str_SeparatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION); switch ($l_str_SeparatorOption) { @@ -896,7 +948,9 @@ class MCI_Footnotes_Task { case 'en_dash' : $l_str_Separator = ' –'; break; } } + } else { + $l_str_Separator = ''; } @@ -908,11 +962,15 @@ class MCI_Footnotes_Task { * making it optional was envisaged. * @since 2.1.4 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))) { + // if so, check if it is customized: $l_str_Terminator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM); + if (empty($l_str_Terminator)) { + // if it is not, check which option is on: $l_str_TerminatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION); switch ($l_str_TerminatorOption) { @@ -921,7 +979,9 @@ class MCI_Footnotes_Task { case 'colon' : $l_str_Terminator = ':'; break; } } + } else { + $l_str_Terminator = ''; } @@ -1022,13 +1082,18 @@ class MCI_Footnotes_Task { // in case the footnote is unique: $l_str_FootnoteReference = "<$l_str_LinkSpan"; $l_str_FootnoteReference .= ' id="footnote_plugin_reference_'; - $l_str_FootnoteReference .= $l_int_PostId; + $l_str_FootnoteReference .= self::$l_int_PostId; + $l_str_FootnoteReference .= '_' . self::$l_int_ReferenceContainerId; $l_str_FootnoteReference .= "_$l_str_FootnoteId\""; $l_str_FootnoteReference .= ' class="footnote_backlink"'; // the click event goes in the table cell: - $l_str_BacklinkEvent = ' onclick="footnote_moveToAnchor_' . $l_int_PostId; - $l_str_BacklinkEvent .= "('footnote_plugin_tooltip_$l_int_PostId"; + $l_str_BacklinkEvent = ' onclick="footnote_moveToAnchor_'; + $l_str_BacklinkEvent .= self::$l_int_PostId; + $l_str_BacklinkEvent .= '_' . self::$l_int_ReferenceContainerId; + $l_str_BacklinkEvent .= "('footnote_plugin_tooltip_"; + $l_str_BacklinkEvent .= self::$l_int_PostId; + $l_str_BacklinkEvent .= '_' . self::$l_int_ReferenceContainerId; $l_str_BacklinkEvent .= "_$l_str_FootnoteId');\""; // the dedicated template enumerating backlinks uses another variable: @@ -1076,11 +1141,16 @@ class MCI_Footnotes_Task { $l_str_FootnoteBacklinks .= "$l_str_Separator"; $l_str_FootnoteBacklinks .= "$l_str_LineBreak<$l_str_LinkSpan"; $l_str_FootnoteBacklinks .= ' id="footnote_plugin_reference_'; - $l_str_FootnoteBacklinks .= $l_int_PostId; + $l_str_FootnoteBacklinks .= self::$l_int_PostId; + $l_str_FootnoteBacklinks .= '_' . self::$l_int_ReferenceContainerId; $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId"; $l_str_FootnoteBacklinks .= '" class="footnote_backlink" '; - $l_str_FootnoteBacklinks .= 'onclick="footnote_moveToAnchor_' . $l_int_PostId; - $l_str_FootnoteBacklinks .= "('footnote_plugin_tooltip_$l_int_PostId"; + $l_str_FootnoteBacklinks .= 'onclick="footnote_moveToAnchor_'; + $l_str_FootnoteBacklinks .= self::$l_int_PostId; + $l_str_FootnoteBacklinks .= '_' . self::$l_int_ReferenceContainerId; + $l_str_FootnoteBacklinks .= "('footnote_plugin_tooltip_"; + $l_str_FootnoteBacklinks .= self::$l_int_PostId; + $l_str_FootnoteBacklinks .= '_' . self::$l_int_ReferenceContainerId; $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId');\">"; $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? '' : $l_str_FootnoteArrow; $l_str_FootnoteBacklinks .= $l_str_FootnoteId; @@ -1104,24 +1174,25 @@ class MCI_Footnotes_Task { $l_obj_Template->replace( array( // placeholder used in all templates: - "text" => $l_str_FootnoteText, + "text" => $l_str_FootnoteText, // used in standard layout W/O COMBINED FOOTNOTES: - "post_id" => $l_int_PostId, - "id" => MCI_Footnotes_Convert::Index($l_int_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)), - "link-start" => $l_str_LinkSpan == 'a' ? '' : '', - "link-end" => $l_str_LinkSpan == 'a' ? '' : '', - "link-span" => $l_str_LinkSpan, - "terminator" => $l_str_Terminator, + "post_id" => self::$l_int_PostId, + "container_id" => self::$l_int_ReferenceContainerId, + "note_id" => MCI_Footnotes_Convert::Index($l_int_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)), + "link-start" => $l_str_LinkSpan == 'a' ? '' : '', + "link-end" => $l_str_LinkSpan == 'a' ? '' : '', + "link-span" => $l_str_LinkSpan, + "terminator" => $l_str_Terminator, // used in standard layout WITH COMBINED IDENTICALS TURNED ON: - "pointer" => empty($l_str_BacklinkEvent) ? '' : ' pointer', - "event" => $l_str_BacklinkEvent, - "backlinks" => empty($l_str_BacklinkEvent) ? $l_str_FootnoteBacklinks : $l_str_FootnoteReference, + "pointer" => empty($l_str_BacklinkEvent) ? '' : ' pointer', + "event" => $l_str_BacklinkEvent, + "backlinks" => empty($l_str_BacklinkEvent) ? $l_str_FootnoteBacklinks : $l_str_FootnoteReference, // Legacy placeholders for use in legacy layout templates: - "arrow" => $l_str_FootnoteArrow, - "index" => $l_str_FootnoteIndex, + "arrow" => $l_str_FootnoteArrow, + "index" => $l_str_FootnoteIndex, ) ); @@ -1141,7 +1212,8 @@ class MCI_Footnotes_Task { $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, + "post_id" => self::$l_int_PostId, + "container_id" => self::$l_int_ReferenceContainerId, "element" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT), "name" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME), "button-style" => !$l_bool_CollapseDefault ? 'display: none;' : '', diff --git a/css/public.css b/css/public.css index 7ed94b9..2166d1a 100755 --- a/css/public.css +++ b/css/public.css @@ -5,7 +5,7 @@ * Created-Time: 16:21 * Since: 1.0 * - * Version: 2.2.8 + * Version: 2.2.10 * * Classes added to public.css may be added to the * list documenting CSS classes for Custom CSS if @@ -20,7 +20,7 @@ * @since 2.1.6 set z-index to maximum 2147483647 to address display issues with overlay content, thanks to @russianicons * @see * - * Last modified: 2020-12-23T1109+0100 + * Last modified: 2020-12-25T2357+0100 */ @@ -287,7 +287,7 @@ enforced borderless table cells with !important property, thanks to @ragonesi .footnote_plugin_index_combi, .footnote_plugin_link, .footnote_plugin_text { - border:none !important; + border: none !important; text-align: left !important; vertical-align: top !important; padding: 5px 6px 10px 0 !important; diff --git a/css/settings.css b/css/settings.css index fd60519..918a7b8 100755 --- a/css/settings.css +++ b/css/settings.css @@ -5,9 +5,9 @@ * Created-Time: 16:21 * Since: 1.0 * - * Version: 2.2.8 + * Version: 2.2.10 * - * Last modified: 2020-12-23T1110+0100 + * Last modified: 2020-12-25T2357+0100 */ diff --git a/footnotes.php b/footnotes.php index a18bee6..4bc19f0 100755 --- a/footnotes.php +++ b/footnotes.php @@ -4,12 +4,12 @@ Plugin URI: https://wordpress.org/plugins/footnotes/ Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine. Author: Mark Cheret - Version: 2.2.8 + Version: 2.2.10 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages */ -define( 'FOOTNOTES_VERSION', '2.2.8' ); +define( 'FOOTNOTES_VERSION', '2.2.10' ); /* Copyright 2020 Mark Cheret (email: mark@cheret.de) diff --git a/readme.txt b/readme.txt index 318200d..0039ed5 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen Requires at least: 3.9 Tested up to: 5.6 Requires PHP: 5.6 -Stable Tag: 2.2.8 +Stable Tag: 2.2.10 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -80,11 +80,22 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == += 2.2.10 = +- Bugfix: Reference container: add option for table borders to revert 2.0.0/2.0.1 change made on user request, thanks to @noobishh +- Bugfix: Reference container: add missing container ID in function name in one of the four table row templates +- Bugfix: Reference container, tooltips: URL wrap: support also file transfer protocol URLs + += 2.2.9 = +- Bugfix: Reference containers, widget_text hook: support for multiple reference containers in a page, thanks to @justbecuz +- Update: Priority levels: set widget_text default to 98 and update its description in the dashboard Priority level tab +- Bugfix: Reference container, tooltips: URL wrap: account for RFC 2396 allowed characters in parameter names +- Bugfix: Reference container, tooltips: URL wrap: exclude URLs also where the equals sign is preceded by an entity or character reference + = 2.2.8 = - Bugfix: Reference container, tooltips: URL wrap: correct lookbehind by duplicating it with and without quotation mark class = 2.2.7 = -- Bugfix: Reference container, tooltips: URL wrap: revert the change in the exclusion regex, thanks to @rjl20 and @spaceling +- Bugfix: Reference container, tooltips: URL wrap: revert the change in the regex, thanks to @rjl20, @spaceling, @friedrichnorth, @bernardzit = 2.2.6 = - Bugfix: Reference container, tooltips: URL wrap: make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 diff --git a/templates/dashboard/settings-reference-container.html b/templates/dashboard/settings-reference-container.html index a9a0824..9233ad6 100644 --- a/templates/dashboard/settings-reference-container.html +++ b/templates/dashboard/settings-reference-container.html @@ -12,6 +12,10 @@ [[label-border]] [[border]] + + [[label-row-borders]] + [[row-borders]] + [[label-collapse]] [[collapse]] diff --git a/templates/public/footnote-alternative.html b/templates/public/footnote-alternative.html index 67f8e69..bae2f27 100644 --- a/templates/public/footnote-alternative.html +++ b/templates/public/footnote-alternative.html @@ -1,16 +1,16 @@ [[link-start]]<[[sup-span]] - id="footnote_plugin_tooltip_[[post_id]]_[[id]]" + id="footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]" class="footnote_plugin_tooltip_text" - onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_reference_[[post_id]]_[[id]]');" + onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');" >[[before]][[index]][[after]][[link-end]] diff --git a/templates/public/footnote.html b/templates/public/footnote.html index c919126..34e34e0 100755 --- a/templates/public/footnote.html +++ b/templates/public/footnote.html @@ -1,12 +1,12 @@ [[link-start]]<[[sup-span]] - id="footnote_plugin_tooltip_[[post_id]]_[[id]]" + id="footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]" class="footnote_plugin_tooltip_text" - onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_reference_[[post_id]]_[[id]]');" + onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]');" >[[before]][[index]][[after]][[link-end]][[text]] + <[[link-span]] - id="footnote_plugin_reference_[[post_id]]_[[id]]" + id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]" class="footnote_index" - onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_tooltip_[[post_id]]_[[id]]');" + onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');" >[[index]][[terminator]]<[[link-span]] - onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_tooltip_[[post_id]]_[[id]]');" + onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');" class="footnote_backlink" >[[arrow]] + + <[[link-span]] class="footnote_plugin_link" >[[index]][[terminator]][[arrow]] + <[[link-span]] class="footnote_plugin_link" >[[arrow]][[index]][[terminator]]<[[element]] >[[name]][+]