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
This commit is contained in:
pewgeuges 2020-12-25 23:00:23 +00:00
parent 790aa3c679
commit 1cb44eccd5
12 changed files with 79 additions and 37 deletions

View file

@ -26,8 +26,10 @@
* @see <https://wordpress.org/support/topic/add-support-for-ibid-notation/> * @see <https://wordpress.org/support/topic/add-support-for-ibid-notation/>
* @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100 * @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100
* @see <https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/> * @see <https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/>
* @since 2.2.10 reference container row border option, thanks to @noobishh 2020-12-25T2316+0100
* @see <https://wordpress.org/support/topic/borders-25/>
* *
* 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)), "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), "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)), "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), "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 * Edited heading 2020-12-12T1453+0100
* @since 2.1.1 more settings and notices, thanks to @nikelaos * @since 2.1.1 more settings and notices, thanks to @nikelaos
* @see <https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068> * @see <https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068>
* @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100 * @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100
*/ */
public function Excerpts() { public function Excerpts() {
@ -896,7 +901,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
* empty should be interpreted as PHP_INT_MAX, * empty should be interpreted as PHP_INT_MAX,
* but a numbox cannot be set to empty: <https://github.com/Modernizr/Modernizr/issues/171> * but a numbox cannot be set to empty: <https://github.com/Modernizr/Modernizr/issues/171>
* define -1 as PHP_INT_MAX instead * 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 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 * @since 2.2.9 added guidance for the widget text hook 2020-12-25T0353+0100
*/ */

View file

@ -31,8 +31,10 @@
* @since 2.2.5 options for reference container label element and bottom border, thanks to @markhillyer 2020-12-18T1455+0100 * @since 2.2.5 options for reference container label element and bottom border, thanks to @markhillyer 2020-12-18T1455+0100
* @see <https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/> * @see <https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/>
* @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.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 <https://wordpress.org/support/topic/borders-25/>
* *
* Last modified: 2020-12-25T1647+0100 * Last modified: 2020-12-25T2336+0100
*/ */
@ -525,6 +527,18 @@ class MCI_Footnotes_Settings {
const C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT = "footnotes_inputfield_reference_container_label_element"; 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"; 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 <https://wordpress.org/support/topic/borders-25/>
*
* @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. * Stores a singleton reference of this class.
* *
@ -592,6 +606,9 @@ class MCI_Footnotes_Settings {
// whether to enqueue additional style sheet: // whether to enqueue additional style sheet:
self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none',
// table cell borders:
self::C_BOOL_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no',
// backlink symbol: // backlink symbol:
self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', 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_ENABLE => 'yes',
@ -751,8 +768,8 @@ class MCI_Footnotes_Settings {
// interpret -1 as PHP_INT_MAX instead // interpret -1 as PHP_INT_MAX instead
self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, 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 // 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 // hooks must be less than 99 because social buttons may yield scripts
// that contain the strings '((' and '))', i.e. the default footnote // that contain the strings '((' and '))', i.e. the default footnote
// start and end short codes, causing issues with fake footnotes. // start and end short codes, causing issues with fake footnotes.
self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98, self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98,

View file

@ -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 * @since 2.2.9 Reference containers, widget_text hook: support for multiple containers in a page, thanks to @justbecuz 2020-12-25T0338+0100
* @see <https://wordpress.org/support/topic/reset-footnotes-to-1/#post-13662830> * @see <https://wordpress.org/support/topic/reset-footnotes-to-1/#post-13662830>
* @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.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 <https://wordpress.org/support/topic/borders-25/>
* *
* Last modified: 2020-12-25T1301+0100 * Last modified: 2020-12-25T2352+0100
*/ */
// If called directly, abort: // If called directly, abort:
@ -235,6 +238,13 @@ class MCI_Footnotes_Task {
echo " {border-bottom: 1px solid #aaaaaa !important;}\r\n"; 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: // 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_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)); $l_bool_ColumnMaxWidthEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED));
@ -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 * @since 2.2.9 account for RFC 2396 allowed characters in parameter names 2020-12-24T1956+0100
* @see <https://stackoverflow.com/questions/814700/http-url-allowed-characters-in-parameter-names> * @see <https://stackoverflow.com/questions/814700/http-url-allowed-characters-in-parameter-names>
* @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.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))) { if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED))) {
$l_str_FootnoteText = preg_replace( '#(?<![-\w\.!~\*\'\(\);]=[\'"])(?<![-\w\.!~\*\'\(\);]=)(https?://[^\\s<]+)#', '<span class="footnote_url_wrap">$1</span>', $l_str_FootnoteText ); $l_str_FootnoteText = preg_replace( '#(?<![-\w\.!~\*\'\(\);]=[\'"])(?<![-\w\.!~\*\'\(\);]=)((ht|f)tps?://[^\\s<]+)#', '<span class="footnote_url_wrap">$1</span>', $l_str_FootnoteText );
} }
// Text to be displayed instead of the footnote // Text to be displayed instead of the footnote

View file

@ -5,7 +5,7 @@
* Created-Time: 16:21 * Created-Time: 16:21
* Since: 1.0 * Since: 1.0
* *
* Version: 2.2.9 * Version: 2.2.10
* *
* Classes added to public.css may be added to the * Classes added to public.css may be added to the
* list documenting CSS classes for Custom CSS if * 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 * @since 2.1.6 set z-index to maximum 2147483647 to address display issues with overlay content, thanks to @russianicons
* @see <https://wordpress.org/support/topic/counter-styles-not-working/> * @see <https://wordpress.org/support/topic/counter-styles-not-working/>
* *
* 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_index_combi,
.footnote_plugin_link, .footnote_plugin_link,
.footnote_plugin_text { .footnote_plugin_text {
border:none !important; border: none !important;
text-align: left !important; text-align: left !important;
vertical-align: top !important; vertical-align: top !important;
padding: 5px 6px 10px 0 !important; padding: 5px 6px 10px 0 !important;

View file

@ -5,9 +5,9 @@
* Created-Time: 16:21 * Created-Time: 16:21
* Since: 1.0 * Since: 1.0
* *
* Version: 2.2.9 * Version: 2.2.10
* *
* Last modified: 2020-12-25T0356+0100 * Last modified: 2020-12-25T2357+0100
*/ */

View file

@ -4,12 +4,12 @@
Plugin URI: https://wordpress.org/plugins/footnotes/ 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. 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 Author: Mark Cheret
Version: 2.2.9 Version: 2.2.10
Author URI: http://cheret.de/plugins/footnotes-2/ Author URI: http://cheret.de/plugins/footnotes-2/
Text Domain: footnotes Text Domain: footnotes
Domain Path: /languages Domain Path: /languages
*/ */
define( 'FOOTNOTES_VERSION', '2.2.9' ); define( 'FOOTNOTES_VERSION', '2.2.10' );
/* /*
Copyright 2020 Mark Cheret (email: mark@cheret.de) Copyright 2020 Mark Cheret (email: mark@cheret.de)

View file

@ -4,7 +4,7 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen
Requires at least: 3.9 Requires at least: 3.9
Tested up to: 5.6 Tested up to: 5.6
Requires PHP: 5.6 Requires PHP: 5.6
Stable Tag: 2.2.9 Stable Tag: 2.2.10
License: GPLv3 or later License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html 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 == == 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 = = 2.2.9 =
- Bugfix: Reference containers, widget_text hook: support for multiple reference containers in a page, thanks to @justbecuz - 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 - Update: Priority levels: set widget_text default to 98 and update its description in the dashboard Priority level tab

View file

@ -12,6 +12,10 @@
<td>[[label-border]]</td> <td>[[label-border]]</td>
<td>[[border]]</td> <td>[[border]]</td>
</tr> </tr>
<tr>
<td>[[label-row-borders]]</td>
<td>[[row-borders]]</td>
</tr>
<tr> <tr>
<td>[[label-collapse]]</td> <td>[[label-collapse]]</td>
<td>[[collapse]]</td> <td>[[collapse]]</td>

View file

@ -1,4 +1,4 @@
<tr> <tr class="footnotes_plugin_reference_row">
<td <td
class="footnote_plugin_index" class="footnote_plugin_index"
><[[link-span]] ><[[link-span]]

View file

@ -1,4 +1,4 @@
<tr> <tr class="footnotes_plugin_reference_row">
<td <td
class="footnote_plugin_index_combi[[pointer]]" class="footnote_plugin_index_combi[[pointer]]"
[[event]] [[event]]

View file

@ -1,4 +1,4 @@
<tr> <tr class="footnotes_plugin_reference_row">
<td <td
id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]" id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]"
class="footnote_plugin_index pointer" class="footnote_plugin_index pointer"

View file

@ -1,8 +1,8 @@
<tr> <tr class="footnotes_plugin_reference_row">
<td <td
id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]" id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]"
class="footnote_plugin_index pointer" class="footnote_plugin_index pointer"
onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');" onclick="footnote_moveToAnchor_[[post_id]]_[[container_id]]('footnote_plugin_tooltip_[[post_id]]_[[container_id]]_[[note_id]]');"
><[[link-span]] ><[[link-span]]
class="footnote_plugin_link" class="footnote_plugin_link"
>[[arrow]][[index]][[terminator]]</[[link-span]] >[[arrow]][[index]][[terminator]]</[[link-span]]