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:
parent
790aa3c679
commit
1cb44eccd5
12 changed files with 79 additions and 37 deletions
|
@ -26,8 +26,10 @@
|
|||
* @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
|
||||
* @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)),
|
||||
"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 <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
|
||||
*/
|
||||
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: <https://github.com/Modernizr/Modernizr/issues/171>
|
||||
* 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
|
||||
*/
|
||||
|
|
|
@ -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 <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.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
|
||||
*/
|
||||
|
||||
|
||||
|
@ -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 <https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/>
|
||||
*/
|
||||
|
@ -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 <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.
|
||||
*
|
||||
|
@ -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 <https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068>
|
||||
*/
|
||||
|
@ -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,
|
||||
|
|
|
@ -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 <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.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:
|
||||
|
@ -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 <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.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( '#(?<![-\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
|
||||
|
@ -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 = '';
|
||||
}
|
||||
|
||||
|
|
|
@ -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 <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_link,
|
||||
.footnote_plugin_text {
|
||||
border:none !important;
|
||||
border: none !important;
|
||||
text-align: left !important;
|
||||
vertical-align: top !important;
|
||||
padding: 5px 6px 10px 0 !important;
|
||||
|
|
|
@ -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
|
||||
*/
|
||||
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -12,6 +12,10 @@
|
|||
<td>[[label-border]]</td>
|
||||
<td>[[border]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-row-borders]]</td>
|
||||
<td>[[row-borders]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-collapse]]</td>
|
||||
<td>[[collapse]]</td>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<tr>
|
||||
<tr class="footnotes_plugin_reference_row">
|
||||
<td
|
||||
class="footnote_plugin_index"
|
||||
><[[link-span]]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<tr>
|
||||
<tr class="footnotes_plugin_reference_row">
|
||||
<td
|
||||
class="footnote_plugin_index_combi[[pointer]]"
|
||||
[[event]]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<tr>
|
||||
<tr class="footnotes_plugin_reference_row">
|
||||
<td
|
||||
id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_plugin_index pointer"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<tr>
|
||||
<tr class="footnotes_plugin_reference_row">
|
||||
<td
|
||||
id="footnote_plugin_reference_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
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]]
|
||||
class="footnote_plugin_link"
|
||||
>[[arrow]][[index]][[terminator]]</[[link-span]]
|
||||
|
|
Reference in a new issue