diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php index b559334..7cbbf75 100644 --- a/class/dashboard/subpage-main.php +++ b/class/dashboard/subpage-main.php @@ -17,8 +17,9 @@ * 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 * - * Last modified: 2020-12-15T0928+0100 + * Last modified: 2020-12-16T1256+0100 */ /** @@ -118,6 +119,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "excerpts", __("Footnotes in excerpts", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Excerpts"); $l_arr_MetaBoxes[] = $this->addMetaBox("settings", "love", MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, "Love"); + $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "hyperlink-arrow", __("Backlink symbol", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "HyperlinkArrow"); $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "superscript", __("Referrer typesetting and formatting", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Superscript"); $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box", __("Tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBox"); $l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-truncation", __("Tooltip truncation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTruncation"); @@ -159,23 +161,25 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { ); // basic responsive page layout options: $l_arr_PageLayoutOptions = array( - "none" => __("no additional external style sheet", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "reference-container" => __("only to the reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), - "page-content" => __("to the div element starting below the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "none" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "reference-container" => __("to the reference container exclusively", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + "entry-content" => __("to the div element starting below the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "main-content" => __("to the main element including the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), ); // options for the separating punctuation between backlinks: - // Unicode names are conventionally uppercase. - $l_arr_Separators = array( + $l_arr_Separators = array( + // Unicode character names are conventionally uppercase. "comma" => __("COMMA", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "semicolon" => __("SEMICOLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "en_dash" => __("EN DASH", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) ); // options for the terminating punctuation after backlinks: - // The Unicode name of RIGHT PARENTHESIS was originally more accurate because it is bidi-mirrored. + // The Unicode name of RIGHT PARENTHESIS was originally more accurate because + // this character is bidi-mirrored. Let’s use the Unicode 1.0 name. // The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct. $l_arr_Terminators = array( "period" => __("FULL STOP", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), + // Unicode 1.0 name of RIGHT PARENTHESIS (represented as a left parenthesis in right-to-left scripts): "parenthesis" => __("CLOSING PARENTHESIS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "colon" => __("COLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) ); @@ -225,9 +229,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __("Display a backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "symbol-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_Enabled), - "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), + "notice-symbol" => __("Please choose or input the symbol at the top of the next dashboard tab.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "label-switch" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __("Symbol appended, not prepended:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "switch" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_Enabled), @@ -736,6 +738,22 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { * * @since 2.1.4 moved to Settings > Reference container > Display a backlink symbol */ + public function HyperlinkArrow() { + // load template file + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-hyperlink-arrow"); + // replace all placeholders + $l_obj_Template->replace( + array( + "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __("Select the backlink symbol:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "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), + ) + ); + // display template with replaced placeholders + echo $l_obj_Template->getContent(); + } /** * Displays the custom css box. diff --git a/class/settings.php b/class/settings.php index 0f5f0d3..bc1e4d7 100644 --- a/class/settings.php +++ b/class/settings.php @@ -22,8 +22,9 @@ * 2.1.6 set default priority level of the_content to 98 2020-12-10T0447+0100 * 2.2.0 reference container custom position shortcode 2020-12-13T2056+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-16T1256+0100 * - * Last modified: 2020-12-15T0744+0100 + * Last modified: 2020-12-16T1256+0100 */ @@ -552,6 +553,8 @@ class MCI_Footnotes_Settings { self::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE => '[[references]]', self::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes', + + // backlink symbol: self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', @@ -598,6 +601,9 @@ class MCI_Footnotes_Settings { "footnotes_storage_custom" => array( + self::C_STR_HYPERLINK_ARROW => '↑', + self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', + self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes', @@ -663,8 +669,6 @@ class MCI_Footnotes_Settings { self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', - self::C_STR_HYPERLINK_ARROW => '↑', - self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', // Custom CSS migrates to a dedicated tab: self::C_STR_CUSTOM_CSS => '', diff --git a/class/task.php b/class/task.php index 9b31ee3..98b56e4 100644 --- a/class/task.php +++ b/class/task.php @@ -30,7 +30,7 @@ * 2.2.0 support for custom position shortcode for reference container 2020-12-13T2058+0100 * 2.2.3 custom CSS from new setting in header after legacy 2020-12-15T1128+0100 * - * Last modified: 2020-12-15T1128+0100 + * Last modified: 2020-12-15T1140+0100 */ // If called directly, abort: @@ -258,11 +258,13 @@ class MCI_Footnotes_Task { printf(" box-shadow: 2px 2px 11px %s;", $l_str_BoxShadowColor); } echo "}\r\n"; - + // set custom CSS to override settings, not conversely: - echo MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS); + // if dashboard tab migration acknowledged, disable legacy in case it was not cut: + if (!MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_MIGRATED))) { + echo MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS); + } echo MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW); - ?> .footnotes_reference_container, main div.footnotes_reference_container { margin: 0 auto; } @@ -41,7 +43,8 @@ main div.footnotes_reference_container { @media (max-width: 575px) { .entry-content div.footnotes_reference_container, - main div.footnotes_reference_container { + .entry-content > .footnotes_reference_container, + main div.footnotes_reference_container { padding: 0 10px; } } @@ -49,6 +52,7 @@ main div.footnotes_reference_container { @media (min-width: 576px) { .entry-content div.footnotes_reference_container, + .entry-content > .footnotes_reference_container, main div.footnotes_reference_container { max-width: 500px; } @@ -57,6 +61,7 @@ main div.footnotes_reference_container { @media (min-width: 768px) { .entry-content div.footnotes_reference_container, + .entry-content > .footnotes_reference_container, main div.footnotes_reference_container { max-width: 600px; } @@ -65,6 +70,7 @@ main div.footnotes_reference_container { @media (min-width: 992px) { .entry-content div.footnotes_reference_container, + .entry-content > .footnotes_reference_container, main div.footnotes_reference_container { max-width: 800px; } @@ -73,6 +79,7 @@ main div.footnotes_reference_container { @media (min-width: 1200px) { .entry-content div.footnotes_reference_container, + .entry-content > .footnotes_reference_container, main div.footnotes_reference_container { max-width: 960px; } diff --git a/css/public.css b/css/public.css index 374defd..355ca5e 100755 --- a/css/public.css +++ b/css/public.css @@ -5,14 +5,14 @@ * Created-Time: 16:21 * Since: 1.0 * - * Version: 2.2.2 + * Version: 2.2.4 * * Classes added to public.css may be added to the * list documenting CSS classes for Custom CSS if * recommended for general use. * List in templates/dashboard/customize-css.html * - * Last modified: 2020-12-15T0844+0100 + * Last modified: 2020-12-16T1302+0100 */ @@ -195,8 +195,6 @@ Classes: .footnote_backlink = or if identical footnotes are combined, or in second in 3-column table .footnote_index_arrow = nested , symbol only .footnote_plugin_text = second , or third in 3-column table - - */ /* diff --git a/css/settings.css b/css/settings.css index e44e621..28610af 100755 --- a/css/settings.css +++ b/css/settings.css @@ -5,9 +5,9 @@ * Created-Time: 16:21 * Since: 1.0 * - * Version: 2.2.2 + * Version: 2.2.4 * - * Last modified: 2020-12-15T1020+0100 + * Last modified: 2020-12-16T1302+0100 */ diff --git a/footnotes.php b/footnotes.php index 12ba89c..463e9fb 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.3 + Version: 2.2.4 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages */ -define( 'FOOTNOTES_VERSION', '2.2.3' ); +define( 'FOOTNOTES_VERSION', '2.2.4' ); /* Copyright 2020 Mark Cheret (email: mark@cheret.de) diff --git a/readme.txt b/readme.txt index c77f81e..aa2461f 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.3 +Stable Tag: 2.2.4 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -80,6 +80,10 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == += 2.2.4 = +- Bugfix: Reference container: Backlink symbol selection: moved back to previous tab “Referrers and tooltips” +- Bugfix: Custom CSS: make inserting existing in header depend on migration complete checkbox status + = 2.2.3 = - Bugfix: Custom CSS: insert new in header after existing diff --git a/templates/dashboard/customize-hyperlink-arrow.html b/templates/dashboard/customize-hyperlink-arrow.html new file mode 100644 index 0000000..148a903 --- /dev/null +++ b/templates/dashboard/customize-hyperlink-arrow.html @@ -0,0 +1,15 @@ +
+

[[description-symbol]]

+
+ + + + + + + + diff --git a/templates/dashboard/settings-reference-container.html b/templates/dashboard/settings-reference-container.html index 9ad8ba7..b8a74c0 100644 --- a/templates/dashboard/settings-reference-container.html +++ b/templates/dashboard/settings-reference-container.html @@ -30,12 +30,7 @@ [[label-symbol]] - - [[symbol-enable]] - [[symbol-options]] - [[symbol-custom]] - [[notice-symbol]] - + [[symbol-enable]] [[notice-symbol]] [[label-switch]]