From d9e23677b0fa7281b9c7a6d41ac821db213049be Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Wed, 17 Feb 2021 09:33:04 +0000 Subject: [PATCH] traceability update 2.5.5d1 git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2476187 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/dashboard/subpage-main.php | 10 ++- class/settings.php | 87 ++++++++++--------- class/task.php | 2 +- css/dev-common.css | 21 +++-- css/settings.css | 4 +- footnotes.php | 6 +- readme.txt | 4 +- .../dashboard/customize-hyperlink-arrow.html | 6 +- templates/dashboard/mouse-over-box-text.html | 6 ++ 9 files changed, 83 insertions(+), 63 deletions(-) diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php index 290ed83..a553dd5 100644 --- a/class/dashboard/subpage-main.php +++ b/class/dashboard/subpage-main.php @@ -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(__("Some themes inhibit jQuery tooltips. Some may disable CSS transitions as well. Alternative tooltips are triggered by inline JavaScript and animated with CSS transitions. If this option is enabled, %s does not load any external scripts.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . ''), + "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), '' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . ''), ) ); @@ -827,6 +827,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { $l_obj_Template->replace( array( + "description-delimiter" => __("Tooltips can display another content than the footnote entry in the reference container. The trigger is a shortcode in the footnote text separating the tooltip text from the note. That is consistent with what WordPress does for excerpts.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "label-delimiter" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER, __("Delimiter for dedicated tooltip text:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "delimiter" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER), "notice-delimiter" => __("If the delimiter shortcode is present, the tooltip text will be the part before it.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), @@ -837,7 +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), + "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), ) @@ -934,7 +938,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { "symbol-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::getArrow()), "symbol-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED), "notice-symbol" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "description-symbol" => __("This setting cannot be moved into the reference container settings, because each tab is saved in a different place, so moving a setting breaks user data. Our apologies for having done so with this setting now moved back to the tab it pre-existed under.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "description-symbol" => __("This symbol is used in the reference container. But this setting pre-existed under this tab and cannot be moved to another one.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), ) ); // display template with replaced placeholders diff --git a/class/settings.php b/class/settings.php index 3fb12f0..ddd1407 100644 --- a/class/settings.php +++ b/class/settings.php @@ -7,7 +7,7 @@ * @since 1.5.0 14.09.14 10:43 * * - * @lastmodified 2021-02-16T0101+0100 + * @lastmodified 2021-02-17T1026+0100 * * @since 2.0.4 restore arrow settings 2020-11-02T2115+0100 * @since 2.0.7 remove hook the_post 2020-11-06T1342+0100 @@ -83,11 +83,8 @@ class MCI_Footnotes_Settings { * @var str * The string is converted to Boolean false if 'no', true if 'yes'. * @see MCI_Footnotes_Convert::toBool() - * The type in the variable name is useful to hint the intended use - * and IMO should therefore not be changed to _STR_ - * Else: - * @todo Change misleading variable names C_BOOL_… to C_STR_… (that’s how Hungarian screws things up). - * @todo Do not convert strings to Booleans: toBool() fixes empty, or empty() must be used everywhere. + * The type in the variable name is useful to show the intention. + * @todo Eventually change misleading variable names C_BOOL_… to C_STR_… (that’s how Hungarian screws things up). */ const C_BOOL_REFERENCE_CONTAINER_COLLAPSE = "footnote_inputfield_collapse_references"; @@ -181,6 +178,9 @@ class MCI_Footnotes_Settings { * * @since 2.1.6 This setting removed as irrelevant since priority level settings need permanent visibility. * @date 2020-12-09T2107+0100 + * + * Since the removal of the the_post hook, the tab is no danger zone any longer. + * All users, not experts only, need to be able to control relative positioning. */ const C_BOOL_FOOTNOTES_EXPERT_MODE = "footnote_inputfield_enable_expert_mode"; @@ -190,6 +190,14 @@ class MCI_Footnotes_Settings { * @author Stefan Herndler * @since 1.5.0 * @var str + * + * The default footnote referrer surroundings should be square brackets: + * + * - with respect to baseline footnote referrers new option; + * - as in English or US American typesetting; + * - for better UX thanks to a more button-like appearance; + * - for stylistic consistency with the expand-collapse button. + * */ const C_STR_FOOTNOTES_STYLING_BEFORE = "footnote_inputfield_custom_styling_before"; @@ -223,6 +231,12 @@ class MCI_Footnotes_Settings { * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566 * * @var str + * + * 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. + * */ const C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE = "footnote_inputfield_custom_mouse_over_box_alternative"; @@ -678,21 +692,25 @@ class MCI_Footnotes_Settings { * Settings container key for shortcode syntax validation. * * @since 2.4.0 - * @var str + * @date 2021-01-01T0616+0100 * - * 2021-01-01T0616+0100 + * @var str */ const C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE = "footnotes_inputfield_shortcode_syntax_validation_enable"; /** * Settings container key to enable a backlink tooltip. * - * - + * - Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report. * * @since 2.5.4 * - * @reporter - * @link + * @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. + * 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 * * @var str */ @@ -701,12 +719,12 @@ class MCI_Footnotes_Settings { /** * Settings container key to configure the backlink tooltip. * - * - + * - Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report. * * @since 2.5.4 * - * @reporter - * @link + * @reporter @theroninjedi47 + * @link https://wordpress.org/support/topic/hyperlinked-footnotes-creating-excessive-back-history/ * * @var str */ @@ -715,12 +733,19 @@ class MCI_Footnotes_Settings { /** * Settings container key to configure the tooltip excerpt delimiter. * - * - + * - Update: Tooltips: ability to display dedicated content before `[[/tooltip]]`, thanks to @jbj2199 issue report. * + * The first implementation used a fixed shortcode provided in the changelog. + * But Footnotes’ UI design policy is to make shortcodes freely configurable. * @since 2.5.4 * - * @reporter - * @link + * @reporter @jbj2199 + * @link https://wordpress.org/support/topic/change-tooltip-text/ + * + * Tooltips can display another content than the footnote entry + * in the reference container. The trigger is a shortcode in + * the footnote text separating the tooltip text from the note. + * That is consistent with what WordPress does for excerpts. * * @var str */ @@ -729,27 +754,21 @@ class MCI_Footnotes_Settings { /** * Settings container key to enable mirroring the tooltip excerpt in the reference container. * - * - - * * @since 2.5.4 - * - * @reporter - * @link - * * @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. + * @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 */ const C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE = "footnotes_inputfield_tooltip_excerpt_mirror_enable"; /** * Settings container key to configure the tooltip excerpt separator in the reference container. * - * - - * * @since 2.5.4 - * - * @reporter - * @link - * * @var str */ const C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR = "footnotes_inputfield_tooltip_excerpt_mirror_separator"; @@ -894,9 +913,6 @@ class MCI_Footnotes_Settings { // excerpt should be disabled: self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'no', - // since removal of the_post hook, expert mode is no danger zone - // not for experts only; raising awareness about relative positioning - // changed default to 'yes': self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes', self::C_STR_FOOTNOTES_LOVE => 'no', @@ -912,18 +928,11 @@ class MCI_Footnotes_Settings { self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', - // The default footnote referrer surroundings should be square brackets: - // * with respect to baseline footnote referrers new option; - // * as in English or US American typesetting; - // * for better UX thanks to a more button-like appearance; - // * for stylistic consistency with the expand-collapse button; self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', self::C_STR_FOOTNOTES_STYLING_AFTER => ']', self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', - // alternative, low-script tooltips using CSS for transitions - // in response to user demand for website with jQuery UI outage self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no', // The mouse over content truncation should be enabled by default diff --git a/class/task.php b/class/task.php index 7952722..e043a6b 100644 --- a/class/task.php +++ b/class/task.php @@ -575,7 +575,7 @@ class MCI_Footnotes_Task { * @since 2.5.4 Bugfix: Referrers: optional fixes to vertical alignment, font size and position (static) for in-theme consistency and cross-theme stability, thanks to @tomturowski bug report. */ public function wp_head() { - + // insert start tag without switching out of PHP: echo "\r\n