dev version implementing @lolzim’s bugfix 2.5.5d2
git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2476267 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
d9e23677b0
commit
f8a87d5928
6 changed files with 41 additions and 18 deletions
|
@ -7,7 +7,7 @@
|
|||
* @since 1.5.0 14.09.14 14:47
|
||||
*
|
||||
*
|
||||
* @lastmodified 2021-02-12T1705+0100
|
||||
* @lastmodified 2021-02-17T1136+0100
|
||||
*
|
||||
* @since 2.0.4 restore arrow settings 2020-11-01T0509+0100
|
||||
* @since 2.1.0 read-on button label 2020-11-08T2148+0100
|
||||
|
@ -615,8 +615,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
$l_arr_Enabled = array(
|
||||
"yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
|
||||
);
|
||||
// options for superscript normalize scope:
|
||||
);
|
||||
// options for superscript normalize scope:
|
||||
$l_arr_NormalizeSuperscript = array(
|
||||
"no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"referrers" => __("Footnote referrers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
|
@ -679,7 +679,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
"alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_Enabled),
|
||||
"notice-alternative" => __("Intended to work around a configuration-related tooltip outage.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
// The placeholder is the name of the plugin as logogram “footnotes”.
|
||||
"description-alternative" => sprintf(__("These alternative tooltips work around a website related jQuery UI outage. They are low-script but use the AMP incompatible onmouseover and onmouseout arguments, along with CSS transitions for fade-in/out. The very small script is inserted after Footnotes’ internal stylesheet. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '<span style="font-style: normal;">' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '</span>'),
|
||||
"description-alternative" => sprintf(__("These alternative tooltips work around a website related jQuery UI outage. They are low-script but use the AMP incompatible onmouseover and onmouseout arguments, along with CSS transitions for fade-in/out. The very small script is inserted after Footnotes’ internal stylesheet. When this option is enabled, %s does not load jQuery UI nor jQuery Tools.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '<span style="font-style: normal;">' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '</span>'),
|
||||
|
||||
)
|
||||
);
|
||||
|
@ -839,9 +839,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
|
||||
"label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR, __("Separator between tooltip text and footnote text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"separator" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR),
|
||||
"notice-separator" => __("May be a simple space, or a line break <br />, or any string in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
|
||||
"description-mirror" => __("Tooltips, even jQuery-driven, may be hard to consult on mobiles. This option allows to find the tooltip content in the reference container too.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"notice-separator" => __("May be a simple space, or a line break <br />, or any string in your language.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
|
||||
"description-mirror" => __("Tooltips, even jQuery-driven, may be hard to consult on mobiles. This option allows to read the tooltip content in the reference container too.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
|
||||
|
||||
)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* @since 1.5.0 14.09.14 10:43
|
||||
*
|
||||
*
|
||||
* @lastmodified 2021-02-17T1026+0100
|
||||
* @lastmodified 2021-02-17T1136+0100
|
||||
*
|
||||
* @since 2.0.4 restore arrow settings 2020-11-02T2115+0100
|
||||
* @since 2.0.7 remove hook the_post 2020-11-06T1342+0100
|
||||
|
@ -699,7 +699,7 @@ class MCI_Footnotes_Settings {
|
|||
const C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE = "footnotes_inputfield_shortcode_syntax_validation_enable";
|
||||
|
||||
/**
|
||||
* Settings container key to enable a backlink tooltip.
|
||||
* Settings container key to enable backlink tooltips.
|
||||
*
|
||||
* - Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report.
|
||||
*
|
||||
|
@ -708,7 +708,8 @@ class MCI_Footnotes_Settings {
|
|||
* @reporter @theroninjedi47
|
||||
* @link https://wordpress.org/support/topic/hyperlinked-footnotes-creating-excessive-back-history/
|
||||
*
|
||||
* When hard links are enabled, clicks on the backlinks are logged in the browsing history.
|
||||
* When hard links are enabled, clicks on the backlinks are logged in the browsing history,
|
||||
* along with clicks on the referrers.
|
||||
* This tooltip hints to use the backbutton instead, so the history gets streamlined again.
|
||||
* @link https://wordpress.org/support/topic/making-it-amp-compatible/#post-13837359
|
||||
*
|
||||
|
@ -758,7 +759,7 @@ class MCI_Footnotes_Settings {
|
|||
* @var str
|
||||
*
|
||||
* Tooltips, even jQuery-driven, may be hard to consult on mobiles.
|
||||
* This option allows to find the tooltip content in the reference container too.
|
||||
* This option allows to read the tooltip content in the reference container too.
|
||||
* @link https://wordpress.org/support/topic/change-tooltip-text/#post-13935050
|
||||
* But this must not be the default behavior.
|
||||
* @link https://wordpress.org/support/topic/change-tooltip-text/#post-13935488
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* @since 1.5.0
|
||||
*
|
||||
*
|
||||
* @lastmodified 2021-02-16T0055+0100
|
||||
* @lastmodified 2021-02-17T1142+0100
|
||||
*
|
||||
* @since 2.0.0 Bugfix: various.
|
||||
* @since 2.0.4 Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report.
|
||||
|
@ -78,6 +78,7 @@
|
|||
* @since 2.5.4 Bugfix: Reference container, tooltips: URL wrap: account for leading space in value, thanks to @karolszakiel example provision.
|
||||
* @since 2.5.4 Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report.
|
||||
* @since 2.5.4 Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error.
|
||||
* @since 2.5.5 Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution.
|
||||
*/
|
||||
|
||||
// If called directly, abort:
|
||||
|
@ -1701,7 +1702,27 @@ class MCI_Footnotes_Task {
|
|||
}
|
||||
// add offset to the new starting position
|
||||
$l_int_PosStart += $l_int_Length + strlen($l_str_EndingTag);
|
||||
$l_int_PosStart = $l_int_Length + strlen($l_str_FootnoteReplaceText);
|
||||
|
||||
/**
|
||||
* Fixes a footnotes numbering bug (happening under de facto rare circumstances).
|
||||
*
|
||||
* - Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution.
|
||||
*
|
||||
* @since 2.5.5
|
||||
*
|
||||
* @contributor @lolzim
|
||||
* @link https://wordpress.org/support/topic/footnotes-numbered-incorrectly/#post-14062032
|
||||
*
|
||||
* @reporter @rumperuu
|
||||
* @link https://wordpress.org/support/topic/footnotes-numbered-incorrectly/
|
||||
*
|
||||
* This line caused the algorithm to jump back near the post start, disturbing
|
||||
* the order of the footnotes depending on the text before the first footnote,
|
||||
* the length of the first footnote and the length of the footnote and tooltip
|
||||
* templates.
|
||||
*/
|
||||
// $l_int_PosStart = $l_int_Length + strlen($l_str_FootnoteReplaceText);
|
||||
|
||||
} while (true);
|
||||
|
||||
// return content
|
||||
|
|
Reference in a new issue