From 1cb44eccd52b3392ba548eecbd3901b09f58dfab 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/trunk@2446030 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/dashboard/subpage-main.php | 11 +++-- class/settings.php | 29 ++++++++++--- class/task.php | 41 ++++++++++++------- css/public.css | 6 +-- css/settings.css | 4 +- footnotes.php | 4 +- readme.txt | 7 +++- .../settings-reference-container.html | 4 ++ .../reference-container-body-3column.html | 2 +- .../reference-container-body-combi.html | 2 +- .../reference-container-body-switch.html | 2 +- .../public/reference-container-body.html | 4 +- 12 files changed, 79 insertions(+), 37 deletions(-) diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php index 973cfe8..9e5092a 100644 --- a/class/dashboard/subpage-main.php +++ b/class/dashboard/subpage-main.php @@ -26,8 +26,10 @@ * @see * @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-25T0355+0100 + * Last modified: 2020-12-25T2336+0100 */ /** @@ -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() { @@ -896,7 +901,7 @@ 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 */ diff --git a/class/settings.php b/class/settings.php index 5efcf7f..17f42bc 100644 --- a/class/settings.php +++ b/class/settings.php @@ -31,8 +31,10 @@ * @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-25T1647+0100 + * Last modified: 2020-12-25T2336+0100 */ @@ -400,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 */ @@ -525,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. * @@ -559,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 */ @@ -592,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', @@ -751,8 +768,8 @@ 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 and of widget_text as the only relevant - // hooks must be less than 99 because social buttons may yield scripts + // 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, diff --git a/class/task.php b/class/task.php index fcf2098..8a170a3 100644 --- a/class/task.php +++ b/class/task.php @@ -55,8 +55,11 @@ * @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-25T1301+0100 + * Last modified: 2020-12-25T2352+0100 */ // If called directly, abort: @@ -235,6 +238,13 @@ class MCI_Footnotes_Task { echo " {border-bottom: 1px solid #aaaaaa !important;}\r\n"; } + // ref container table borders: + if ( MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE))) { + echo ".footnotes_table, .footnotes_plugin_reference_row {"; + echo "border: 1px solid #060606;"; + echo " !important;}\r\n"; + } + // ref container first column width and max-width: $l_bool_ColumnWidthEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED)); $l_bool_ColumnMaxWidthEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED)); @@ -626,7 +636,7 @@ 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) { @@ -720,9 +730,10 @@ class MCI_Footnotes_Task { * @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 @@ -920,15 +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) { @@ -937,9 +948,9 @@ class MCI_Footnotes_Task { case 'en_dash' : $l_str_Separator = ' –'; break; } } - + } else { - + $l_str_Separator = ''; } @@ -951,15 +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) { @@ -968,9 +979,9 @@ class MCI_Footnotes_Task { case 'colon' : $l_str_Terminator = ':'; break; } } - + } else { - + $l_str_Terminator = ''; } diff --git a/css/public.css b/css/public.css index cb48c33..2166d1a 100755 --- a/css/public.css +++ b/css/public.css @@ -5,7 +5,7 @@ * Created-Time: 16:21 * Since: 1.0 * - * Version: 2.2.9 + * 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-25T0356+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 f390704..918a7b8 100755 --- a/css/settings.css +++ b/css/settings.css @@ -5,9 +5,9 @@ * Created-Time: 16:21 * Since: 1.0 * - * Version: 2.2.9 + * Version: 2.2.10 * - * Last modified: 2020-12-25T0356+0100 + * Last modified: 2020-12-25T2357+0100 */ diff --git a/footnotes.php b/footnotes.php index 9f4d19e..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.9 + Version: 2.2.10 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages */ -define( 'FOOTNOTES_VERSION', '2.2.9' ); +define( 'FOOTNOTES_VERSION', '2.2.10' ); /* Copyright 2020 Mark Cheret (email: mark@cheret.de) diff --git a/readme.txt b/readme.txt index ed75659..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.9 +Stable Tag: 2.2.10 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -80,6 +80,11 @@ 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 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/reference-container-body-3column.html b/templates/public/reference-container-body-3column.html index 95deb79..b6509c8 100644 --- a/templates/public/reference-container-body-3column.html +++ b/templates/public/reference-container-body-3column.html @@ -1,4 +1,4 @@ - + <[[link-span]] diff --git a/templates/public/reference-container-body-combi.html b/templates/public/reference-container-body-combi.html index 57cd36d..44e2ac6 100644 --- a/templates/public/reference-container-body-combi.html +++ b/templates/public/reference-container-body-combi.html @@ -1,4 +1,4 @@ - + + + <[[link-span]] class="footnote_plugin_link" >[[arrow]][[index]][[terminator]]