diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php index 675860b..290ed83 100644 --- a/class/dashboard/subpage-main.php +++ b/class/dashboard/subpage-main.php @@ -7,7 +7,7 @@ * @since 1.5.0 14.09.14 14:47 * * - * @lastmodified 2021-02-12T1035+0100 + * @lastmodified 2021-02-12T1705+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,6 +615,12 @@ 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: + $l_arr_NormalizeSuperscript = array( + "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "referrers" => __("Footnote referrers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "all" => __("All superscript elements", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), ); // load template file $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-superscript"); @@ -632,6 +638,10 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "notice-link" => __("Please find this setting at the end of the reference container settings. The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + + "label-normalize" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __("Normalize vertical alignment and font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "normalize" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_NormalizeSuperscript), + "notice-normalize" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), ) ); // display template with replaced placeholders diff --git a/class/settings.php b/class/settings.php index 2cc0b8e..e0dc440 100644 --- a/class/settings.php +++ b/class/settings.php @@ -675,7 +675,7 @@ class MCI_Footnotes_Settings { const C_STR_HARD_LINK_IDS_SEPARATOR = "footnotes_inputfield_hard_link_ids_separator"; /** - * Settings container key for shortcode syntax validation + * Settings container key for shortcode syntax validation. * * @since 2.4.0 * @var str @@ -685,7 +685,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 a backlink tooltip. * * - * @@ -699,7 +699,7 @@ class MCI_Footnotes_Settings { const C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE = "footnotes_inputfield_backlink_tooltip_enable"; /** - * Settings container key to configure the backlink tooltip + * Settings container key to configure the backlink tooltip. * * - * @@ -713,7 +713,7 @@ class MCI_Footnotes_Settings { const C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT = "footnotes_inputfield_backlink_tooltip_text"; /** - * Settings container key to configure the tooltip excerpt delimiter + * Settings container key to configure the tooltip excerpt delimiter. * * - * @@ -727,7 +727,7 @@ class MCI_Footnotes_Settings { const C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER = "footnotes_inputfield_tooltip_excerpt_delimiter"; /** - * Settings container key to enable mirroring the tooltip excerpt in the reference container + * Settings container key to enable mirroring the tooltip excerpt in the reference container. * * - * @@ -741,7 +741,7 @@ class MCI_Footnotes_Settings { 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 + * Settings container key to configure the tooltip excerpt separator in the reference container. * * - * @@ -754,6 +754,20 @@ class MCI_Footnotes_Settings { */ const C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR = "footnotes_inputfield_tooltip_excerpt_mirror_separator"; + /** + * Settings container key to enable superscript style normalization. + * + * - + * + * @since 2.5.4 + * + * @reporter + * @link + * + * @var str + */ + const C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT = "footnotes_inputfield_referrers_normal_superscript"; + /** * SETTINGS STORAGE @@ -924,6 +938,7 @@ class MCI_Footnotes_Settings { self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]', self::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no', self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ', + self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no', // The default position should not be lateral because of the risk diff --git a/class/task.php b/class/task.php index f240ee5..1f9e8b2 100644 --- a/class/task.php +++ b/class/task.php @@ -7,7 +7,7 @@ * @since 1.5.0 * * - * @lastmodified 2021-02-12T1100+0100 + * @lastmodified 2021-02-12T1641+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. @@ -74,6 +74,7 @@ * @since 2.5.1 Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. * @since 2.5.2 Update: Tooltips: ability to display dedicated content before `[[/tooltip]]`, thanks to @jbj2199 issue report. * @since 2.5.3 Bugfix: Reference container, tooltips: URL wrap: exclude URL pattern as folder name in Wayback Machine URL, thanks to @rumperuu bug report. + * @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 * @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. @@ -186,12 +187,12 @@ class MCI_Footnotes_Task { /** * Hard links for AMP compatibility - * + * * @since 2.0.0 Bugfix: footnote links script independent. - * - * - * - Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. - * + * + * + * - Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. + * * @since 2.0.4 * * @reporter @theroninjedi47 @@ -571,12 +572,37 @@ class MCI_Footnotes_Task { * @since 2.2.5 Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report. * @since 2.2.5 Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report. * @since 2.3.0 Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report. + * @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