update trunk/ in vue of urgent bugfix plus feature release 2.5.0

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2452163 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
pewgeuges 2021-01-07 21:21:29 +00:00
parent 53def2ec48
commit 354b5439f0
27 changed files with 222 additions and 115 deletions

View file

@ -6,7 +6,7 @@
* @author Stefan Herndler
* @since 1.5.0 14.09.14 14:47
*
* Last modified: 2021-01-02T2335+0100
* Last modified: 2021-01-07T2207+0100
*
* Edited:
* @since 2.0.4 restore arrow settings 2020-11-01T0509+0100
@ -39,6 +39,8 @@
* @see <https://wordpress.org/support/topic/making-it-amp-compatible/>
* @see <https://wordpress.org/support/topic/footnotes-is-not-amp-compatible/>
* @since 2.4.0 footnote shortcode syntax validation 2021-01-01T0624+0100
* @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra
* @see <https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/>
*/
/**
@ -98,12 +100,17 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
*/
protected function getSections() {
$l_arr_Tabs = array();
// sync tab name with mirror in task.php:
$l_arr_Tabs[] = $this->addSection("settings", __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 0, true);
// tab name used in public function CustomCSSMigration()
// sync tab name with mirror in public function CustomCSSMigration():
$l_arr_Tabs[] = $this->addSection("customize", __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 1, true);
$l_arr_Tabs[] = $this->addSection("expert", __("Scope and priority", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 2, true);
$l_arr_Tabs[] = $this->addSection("customcss", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 3, true);
$l_arr_Tabs[] = $this->addSection("how-to", __("Quick start guide", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false);
return $l_arr_Tabs;
}
@ -132,6 +139,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
protected function getMetaBoxes() {
$l_arr_MetaBoxes = array();
// sync box name with mirror in task.php:
$l_arr_MetaBoxes[] = $this->addMetaBox("settings", "start-end", __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "StartEnd");
$l_arr_MetaBoxes[] = $this->addMetaBox("settings", "numbering", __("Footnotes numbering", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Numbering");
$l_arr_MetaBoxes[] = $this->addMetaBox("settings", "scrolling", __("Scrolling behavior", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Scrolling");
@ -340,8 +348,10 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
* @since 2.2.0 3 boxes for clarity 2020-12-12T1422+0100
* @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2019+0100
* @see <https://wordpress.org/support/topic/add-support-for-ibid-notation/>
* @since 2.4.0 added warning about Block Editor escapement disruption 2021-01-02T2324+0100
* @since 2.4.0 removed the HTML comment tag option 2021-01-02T2325+0100
* @since 2.4.0 added warning about Block Editor escapement disruption 2021-01-02T2324+0100
* @since 2.4.0 removed the HTML comment tag option 2021-01-02T2325+0100
* @since 2.5.0 Shortcode syntax validation: add more information around the setting, thanks to @andreasra
* @see <https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/>
*/
public function StartEnd() {
// footnotes start tag short code options:
@ -384,7 +394,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
$l_obj_Template->replace(
array(
"description" => __("WARNING: Short codes with closing pointy brackets are disabled in the new WordPress Block Editor that disrupts the traditional balanced escapement applied by WordPress Classic Editor.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"description-escapement" => __("WARNING: Short codes with closing pointy brackets are disabled in the new WordPress Block Editor that disrupts the traditional balanced escapement applied by WordPress Classic Editor.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-short-code-start" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __("Footnote start tag short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"short-code-start" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_ShortCodeStart),
@ -395,15 +405,19 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"short-code-end-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED),
// for script showing/hiding user defined text boxes:
"short-code-start-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START,
"short-code-start-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START,
"short-code-end-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END,
"short-code-start-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED,
"short-code-end-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED,
// option to enable syntax validation:
"description-parentheses" => __("WARNING: Although widespread industry standard, the double parentheses are problematic because they may occur in scripts embedded in the content and be mistaken as a short code.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
// option to enable syntax validation, label mirrored in task.php:
"label-syntax" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, __("Check for balanced shortcodes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"syntax" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE, $l_arr_Enable),
"notice-syntax" => __("In the presence of a lone start tag shortcode, a warning displays below the post title.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"description-syntax" => __("If the start tag short code is (( or (((, it will not be reported as unbalanced if the following string contains braces hinting that it is a script.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
)
);
// display template with replaced placeholders
@ -550,6 +564,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/jquery-comes-up-in-feed-content/#post-13110879>
* @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100
*/
public function Excerpts() {

View file

@ -6,7 +6,7 @@
* @author Stefan Herndler
* @since 1.5.0 14.09.14 10:43
*
* Last modified: 2021-01-02T2340+0100
* Last modified: 2021-01-07T2206+0100
*
* Edited:
* @since 2.0.4 restore arrow settings 2020-11-02T2115+0100

View file

@ -8,7 +8,7 @@
*
* Edited for v2.0.0 and following.
*
* Last modified: 2021-01-04T1623+0100
* Last modified: 2021-01-07T2219+0100
*
* @since 2.0.5 Autoload / infinite scroll support added thanks to code from @docteurfitness
* @see <https://wordpress.org/support/topic/auto-load-post-compatibility-update/>
@ -72,6 +72,12 @@
* @since 2.4.0 set empty reference container label to NNBSP to make it more robust, thanks to @lukashuggenberg 2021-01-04T0504+0100
* @since 2.4.0 optimize template load and process, thanks to @misfist 2021-01-04T1355+0100
* @since 2.4.0 initialize hard link address as empty to fix undefined variable bug, thanks to @a223123131 2021-01-04T1622+0100
* @since 2.5.0 Shortcode syntax validation: exclude certain cases involving scripts, thanks to @andreasra 2021-01-07T0824+0100
* @since 2.5.0 Shortcode syntax validation: complete message with hint about setting, thanks to @andreasra
* @since 2.5.0 Shortcode syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra
* @see <https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/>
* @since 2.5.0 Hooks: support the term_description hook, thanks to @vitaefit (feature) and @misfist (hook name)
* @see <https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/>
*/
// If called directly, abort:
@ -247,9 +253,12 @@ class MCI_Footnotes_Task {
* @since 1.5.0
*
* Edited for:
* @since 2.0.5 through v2.0.7 changes to priority 2020-11-02T0330+0100..2020-11-06T1344+0100
* @since 2.1.1 add setting for the_content
* @since 2.1.2 add settings for 4 other hooks 2020-11-19T1248+0100
* @since 2.0.5 through v2.0.7 changes to priority 2020-11-02T0330+0100..2020-11-06T1344+0100
* @since 2.1.1 add setting for the_content
* @since 2.1.2 add settings for 4 other hooks 2020-11-19T1248+0100
*
* @since 2.5.0 support for the term_description hook, thanks to @vitaefit (feature) and @misfist (hook name)
* @see <https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/>
*
* Setting the_content priority to "10" instead of PHP_INT_MAX i.e. 9223372036854775807
* makes the footnotes reference container display beneath the post and above other
@ -293,6 +302,7 @@ class MCI_Footnotes_Task {
// custom priority level for reference container relative positioning; default 98:
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT))) {
add_filter('the_content', array($this, "the_content"), $p_int_TheContentPriority);
add_filter('term_description', array($this, "the_content"), $p_int_TheContentPriority);
}
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT))) {
@ -305,6 +315,11 @@ class MCI_Footnotes_Task {
add_filter('widget_text', array($this, "widget_text"), $p_int_WidgetTextPriority);
}
// HOOK FOR CATEGORY PAGES:
// 2021-01-05T1402+0100
// see <https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/#post-13866617>
// add_filter('term_description', array($this, "the_content"), $p_int_TheContentPriority);
// REMOVED the_post HOOK 2020-11-08T1839+0100
//
@ -772,6 +787,10 @@ class MCI_Footnotes_Task {
* Edited since 2.0.0
*
* @since 2.4.0 footnote shortcode syntax validation
* @since 2.5.0 Shortcode syntax validation: exclude certain cases involving scripts, thanks to @andreasra 2021-01-07T0824+0100
* @since 2.5.0 Shortcode syntax validation: complete message with hint about setting, thanks to @andreasra
* @since 2.5.0 Shortcode syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra
* @see <https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/>
*/
public function search($p_str_Content, $p_bool_ConvertHtmlChars, $p_bool_HideFootnotesText) {
@ -780,7 +799,7 @@ class MCI_Footnotes_Task {
// contains the index for the next footnote on this page
$l_int_FootnoteIndex = count(self::$a_arr_Footnotes) + 1;
// contains the starting position for the lookup of a footnote
$l_int_PosStart = 0;
@ -805,9 +824,24 @@ class MCI_Footnotes_Task {
// if footnotes short codes are unbalanced, and syntax validation is not disabled,
// return content with prepended warning:
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE))) {
// convert the shortcodes to regex syntax conformant:
$l_str_StartTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_StartingTag );
$l_str_EndTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_EndingTag );
$l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ').)*?)(' . $l_str_StartTagRegex . '|$)#s';
// apply different regex depending on whether start shortcode is double/triple opening parenthesis:
if ( $l_str_StartingTag == '((' || $l_str_StartingTag == '(((' ) {
// this prevents from catching a script containing e.g. a double opening parenthesis:
$l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ')[^\{\}])*?)(' . $l_str_StartTagRegex . '|$)#s';
} else {
// catch all only if the start shortcode is not double/triple opening parenthesis, i.e. is unlikely to occur in scripts:
$l_str_ValidationRegex = '#' . $l_str_StartTagRegex . '(((?!' . $l_str_EndTagRegex . ').)*?)(' . $l_str_StartTagRegex . '|$)#s';
}
// check syntax and get error locations:
preg_match( $l_str_ValidationRegex, $p_str_Content, $p_arr_ErrorLocation );
if ( empty( $p_arr_ErrorLocation ) ) {
self::$l_bool_SyntaxErrorFlag = false;
@ -815,15 +849,33 @@ class MCI_Footnotes_Task {
// prevent generating and inserting the warning multiple times:
if ( self::$l_bool_SyntaxErrorFlag ) {
$l_str_ErrorSpotString = strip_tags($p_arr_ErrorLocation[1]);
// get plain text string for error location:
$l_str_ErrorSpotString = strip_tags( $p_arr_ErrorLocation[1] );
// limit string length to 300 characters:
if ( strlen( $l_str_ErrorSpotString ) > 300 ) {
$l_str_ErrorSpotString = substr( $l_str_ErrorSpotString, 0, 299 ) . '…';
}
// compose warning box:
$l_str_SyntaxErrorWarning = '<div class="footnotes_validation_error"><p>';
$l_str_SyntaxErrorWarning .= __("WARNING: unbalanced footnote start tag short code before:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME);
$l_str_SyntaxErrorWarning .= __("WARNING: unbalanced footnote start tag short code found.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME);
$l_str_SyntaxErrorWarning .= '</p><p>';
// syntax validation setting in the dashboard under the General settings tab:
$l_str_SyntaxErrorWarning .= sprintf( __("If this warning is irrelevant, please disable the syntax validation feature in the dashboard under %s &gt; %s &gt; %s.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Check for balanced shortcodes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) );
$l_str_SyntaxErrorWarning .= '</p><p>';
$l_str_SyntaxErrorWarning .= __("Unbalanced start tag short code found before:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME);
$l_str_SyntaxErrorWarning .= '</p><p>“';
$l_str_SyntaxErrorWarning .= $l_str_ErrorSpotString;
$l_str_SyntaxErrorWarning .= '”</p></div>';
// prepend the warning box to the content:
$p_str_Content = $l_str_SyntaxErrorWarning . $p_str_Content;
// checked, set flag to false to prevent duplicate warning:
self::$l_bool_SyntaxErrorFlag = false;
return $p_str_Content;
@ -1276,10 +1328,10 @@ class MCI_Footnotes_Task {
// INDEX COLUMN WITH ONE BACKLINK PER TABLE ROW
// if enabled, and for the case the footnote is single, compose hard link:
// define variable as empty for the reference container if not enabled:
$l_str_HardLinkAddress = '';
if (self::$l_bool_HardLinksEnable) {
// define variable as empty for the reference container if not enabled:
$l_str_HardLinkAddress = '';
if (self::$l_bool_HardLinksEnable) {
// compose fragment ID anchor with offset, for use in reference container, an
// empty span child of empty span to avoid tall dotted rectangles in browser:

View file

@ -6,7 +6,7 @@
* @author Stefan Herndler
* @since 1.5.0 14.09.14 10:58
*
* Last modified: 2021-01-02T2352+0100
* Last modified: 2021-01-07T2209+0100
*
* Edited:
* @since 2.0.3 prettify reference container template
@ -18,6 +18,8 @@
* @see <https://wordpress.org/support/topic/template-override-filter/>
* @since 2.4.0 templates may be in active theme, thanks to @misfist
* @see <https://wordpress.org/support/topic/template-override-filter/#post-13846598>
* @since 2.5.0 Enable template location stack, contributed by @misfist
* @see <https://wordpress.org/support/topic/template-override-filter/#post-13864301>
*/
@ -68,7 +70,7 @@ class MCI_Footnotes_Template {
/**
* Plugin Directory
*
*
* @author Patrizia Lutz @misfist
* @since 2.4.0d3
*
@ -93,7 +95,7 @@ class MCI_Footnotes_Template {
* @see <https://wordpress.org/support/topic/template-override-filter/>
*
* @since 2.2.6 delete a space before a closing pointy bracket
*
*
* @since 2.4.0 look for custom template in the active theme first, thanks to @misfist
* @see <https://wordpress.org/support/topic/template-override-filter/#post-13846598>
*/
@ -105,18 +107,18 @@ class MCI_Footnotes_Template {
/**
* Define plugin root path
*
*
* @since 2.4.0d3
*
*
* @author Patrizia Lutz @misfist
*/
$this->plugin_directory = plugin_dir_path( dirname( __FILE__ ) );
/**
* Modularize functions
*
*
* @since 2.4.0d3
*
*
* @author Patrizia Lutz @misfist
*/
if( $template = $this->get_template( $p_str_FileType, $p_str_FileName, $p_str_Extension ) ) {
@ -173,11 +175,11 @@ class MCI_Footnotes_Template {
return $this->a_str_ReplacedContent;
}
/**
/**
* Process template file
*
*
* @author Patrizia Lutz @misfist
*
*
* @since 2.4.0d3
*
* @param string $template
@ -194,9 +196,9 @@ class MCI_Footnotes_Template {
/**
* Get the template
*
*
* @author Patrizia Lutz @misfist
*
*
* @since 2.4.0d3
*
* @param string $p_str_FileType
@ -221,17 +223,17 @@ class MCI_Footnotes_Template {
/**
* Look in active (child) theme
*/
if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name ) ) {
if ( file_exists( trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name ) ) {
$located = trailingslashit( get_stylesheet_directory() ) . $template_directory . $template_name;
/**
* Look in parent theme
*/
} elseif ( file_exists( trailingslashit( get_template_directory() ) . $template_directory . $template_name ) ) {
$located = trailingslashit( get_template_directory() ) . $template_directory . $template_name;
/**
* Look custom directory
* Look in custom directory
*/
} elseif ( file_exists( trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name ) ) {
$located = trailingslashit( WP_PLUGIN_DIR ) . $custom_directory . 'templates/' . $template_name;

View file

@ -5,9 +5,9 @@
* Created-Time: 16:21
* Since: 1.0
*
* Version: 2.4.0
* Version: 2.5.0
*
* Last modified: 2021-01-02T1203+0100
* Last modified: 2021-01-07T0851+0100
*
*
* Classes added to public.css may be added to the
@ -62,28 +62,39 @@ issue with missing content or footnotes, while it may
be hard to detect in long posts and under deadline.
A validation check displays a warning box below the
post title, populated with the first instance of a
content snippet preceded by an unbalanced start tag
short code.
post title, populated with 300 characters of contente
preceded by the first unbalanced start tag short code.
@since 2.4.0
@since 2.5.0 improvement increased paragraph number
*/
.footnotes_validation_error {
border: 4px solid red;
padding: 20px;
background: #ff000055;
border: 4px solid red;
padding: 20px 40px;
margin: 20px 0;
background: #ff000055;
text-align: start;
}
.footnotes_validation_error p:first-child {
font-size: 20px;
font-weight: bold;
text-align: center;
font-size: 20px;
font-weight: bold;
text-align: center;
}
.footnotes_validation_error p:nth-child(2) {
font-size: 16px;
font-style: italic;
}
.footnotes_validation_error p:nth-child(3) {
font-size: 14px;
font-weight: bold;
}
.footnotes_validation_error p:last-child {
font-size: 12px;
text-align: start;
font-size: 12px;
}
/*****************************************************

View file

@ -5,9 +5,9 @@
* Created-Time: 16:21
* Since: 1.0
*
* Version: 2.4.0
* Version: 2.5.0
*
* Last modified: 2021-01-02T1204+0100
* Last modified: 2021-01-07T1816+0100
*/
@ -166,51 +166,54 @@ Hooks and priority levels:
initialized from style attributes in templates
IE doesnt support nth child, but these are not critical
*/
#expert_lookup tr th:first-child,
#expert_lookup tr td:first-child {
.expert_lookup tr th:first-child,
.expert_lookup tr td:first-child {
width: 170px !important;
}
#expert_lookup tr th:nth-child(2),
#expert_lookup tr td:nth-child(2) {
.expert_lookup tr th:nth-child(2),
.expert_lookup tr td:nth-child(2) {
width: 65px !important;
}
#expert_lookup tr th:nth-child(3),
#expert_lookup tr td:nth-child(3) {
.expert_lookup tr th:nth-child(3),
.expert_lookup tr td:nth-child(3) {
width: 200px !important;
}
#expert_lookup tr td:nth-child(3) input {
.expert_lookup tr td:nth-child(3) input {
width: 190px;
}
#expert_lookup tr th:last-child,
#expert_lookup tr td:last-child {
.expert_lookup tr th:last-child,
.expert_lookup tr td:last-child {
white-space: nowrap;
}
/*
Custom CSS
The number of CSS classes recommended for customization
significantly increased from 4 to 18 as of v2.4.0.
Localized notices are dropped to ease translators task.
16 CSS classes are listed directly in the template
CSS classes are listed directly in the template
templates/dashboard/customize-css.html
</p> end tags are omitted per HTML5 standard, to improve
maintainability and readability of the source list.
For better maintainability and readability of the source
list, the </p> end tags are omitted per HTML5 standard:
<https://stackoverflow.com/questions/8460993/p-end-tag-p-is-not-needed-in-html>
The textarea has monospace font, but no other features
helping edit CSS, as tab support and syntactic colors.
helping edit CSS, like tab support and syntactic colors.
*/
#customize_css_new tr td:first-child {
.customize_css_new tr td:first-child {
width: 44% !important;
font-weight: normal !important;
}
#customize_css_new tr td:first-child span:first-child {
.customize_css_new tr td:first-child span:first-child {
font-weight: bold !important;
}
#customize_css_new .list {
.customize_css_new .list {
padding-top: 10px;
}
#customize_css_new .list p {
.customize_css_new .list p {
font-family: monospace;
padding: 0 10px;
text-indent: -10px;

View file

@ -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.5.0d0
Version: 2.5.0
Author URI: http://cheret.de/plugins/footnotes-2/
Text Domain: footnotes
Domain Path: /languages
*/
define( 'FOOTNOTES_VERSION', '2.5.0d0' );
define( 'FOOTNOTES_VERSION', '2.5.0' );
/*
Copyright 2020 Mark Cheret (email: mark@cheret.de)

View file

@ -80,17 +80,24 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
== Changelog ==
= 2.4.0 =
- Bugfix: initialize hard link address as empty to fix undefined variable bug, thanks to @a223123131
- Bugfix: Shortcodes: Dashboard: warning about '&gt;' escapement disruption in WordPress Block Editor
- Bugfix: Shortcodes: Dashboard: remove new option involving HTML comment tags only usable in source mode
= 2.5.0 =
- Add: Customization: Enable template location stack, contributed by @misfist
- Bugfix: optimize template load and process according to settings, thanks to @misfist
- Bugfix: Hooks: support the term_description hook, thanks to @vitaefit (feature) and @misfist (hook name)
- Bugfix: Shortcode syntax validation: exclude certain cases involving scripts, thanks to @andreasra
- Bugfix: Shortcode syntax validation: complete message with hint about setting, thanks to @andreasra
- Bugfix: Shortcode syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra
- Update: Shortcode syntax validation: add more information around the setting, thanks to @andreasra
- Bugfix: Shortcodes: Dashboard: warning about '&gt;' escapement disruption in WordPress Block Editor
= 2.4.0 =
- Add: Shortcodes: syntax validation for balanced footnote start and end tag short codes
- Bugfix: initialize hard link address variable to empty to fix 'undefined variable' bug, thanks to @a223123131
- Bugfix: Shortcodes: Dashboard: remove new option involving HTML comment tags only usable in source mode
- Bugfix: optimize template load and process according to settings, thanks to @misfist
- Bugfix: Reference container: Row borders: adapt left padding to the presence of an optional left border
- Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg
- Bugfix: Scroll offset: initialize to safer one third window height for more robustness, thanks to @lukashuggenberg
- Bugfix: Reference container: add class 'footnote_plugin_symbol' to disambiguate repurposed class footnote_plugin_link
- Bugfix: Reference container: add class 'footnote_plugin_symbol' to disambiguate repurposed class 'footnote_plugin_link'
= 2.3.0 =
- Add: optional hard links in referrers and backlinks for AMP compatibility, thanks to @psykonevro and @martinneumannat
@ -125,14 +132,15 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
- Add: Customization: support for custom templates in sibling folder (should be filterable function, thanks to @misfist)
= 2.2.5 =
- Add: Dashboard: Footnotes numbering: add support for Ibid. notation in suggestions for guidance, thanks to @meglio
- Add: Reference container: support options for label element and label bottom border, thanks to @markhillyer
- Bugfix: Dashboard: Footnotes numbering: add missing support for Ibid. notation to suggestions, thanks to @meglio
- Bugfix: Reference container: Label: not enforce bottom border but make it an option, thanks to @markhillyer
- Bugfix: Reference container: Label: allow to switch from paragraph element to heading, thanks to @markhillyer
- Bugfix: Referernce container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe
- Bugfix: Dashboard: Tooltip position/timing settings: include alternative tooltips (for themes not supporting jQuery tooltips)
- Bugfix: Dashboard: Tooltip position/timing settings: raise above tooltip truncation settings for better consistency
= 2.2.4 =
- Bugfix: Reference container: Backlink symbol selection: moved back to previous tab “Referrers and tooltips”
- Bugfix: Reference container: Backlink symbol selection: move back to previous tab “Referrers and tooltips”
- Bugfix: Custom CSS: make inserting existing in header depend on migration complete checkbox status
= 2.2.3 =
@ -140,7 +148,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
= 2.2.2 =
- Bugfix: Dashboard: Link element setting only under General settings > Reference container
- Add: Dashboard: migrate Custom CSS to dedicated new tab, keep legacy until checking a box
- Bugfix: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed
- Bugfix: Reference container: edits to optional basic responsive page layout style sheets
= 2.2.1 =
@ -148,16 +156,16 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
= 2.2.0 =
- Add: Reference container: support for custom position shortcode, thanks to @hamshe
- Update: Priority levels: update the notice in the dashboard Priority tab
- Bugfix: Tooltips: add 'important' property to z-index to fix display overlay issue
- Add: Start/end short codes: more predefined options
- Add: Numbering styles: lowercase Roman numerals support
- Update: Dashboard: Tooltip settings: grouped into 3 thematic containers
- Update: Dashboard: Main settings: grouped into 3 specific containers
- Update: Dashboard: moved link element option to the Referrers options
- Update: Dashboard: moved URL wrap option to the Reference container options
- Update: Dashboard: grouped both Custom CSS and priority level settings under the same tab
- Update: Dashboard: renamed tab labels 'Referrers and tooltips', 'Priority and CSS'
- Update: Priority levels: update the notice in the dashboard Priority tab
- Update: Dashboard: Tooltip settings: group into 3 thematic containers
- Update: Dashboard: Main settings: group into 3 specific containers
- Update: Dashboard: move link element option to the Referrers options
- Update: Dashboard: move URL wrap option to the Reference container options
- Update: Dashboard: group both Custom CSS and priority level settings under the same tab
- Update: Dashboard: rename tab labels 'Referrers and tooltips', 'Priority and CSS'
- Bugfix: Tooltips: add 'important' property to z-index to fix display overlay issue
- Bugfix: Localization: correct arguments for plugin textdomain load function
- Bugfix: Reference container, tooltips: URL wrap: specifically catch the quotation mark
- Add: Footnotes mention in the footer: more options
@ -176,13 +184,14 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
- Bugfix: Reference container, tooltips: URL wrap: exclude image source too, thanks to @bjrnet21
= 2.1.4 =
- Add: Dashboard: Main settings: add settings for scroll offset and duration
- Add: Dashboard: Tooltip settings: add settings for display delays and fade durations
- Add: Styling: Tooltips: fix font size issue by adding font size to settings with legacy as default
- Add: Reference container: fix theme-dependent layout issues by optionally enqueuing additional style sheet
- Add: Reference container: fix layout issues by moving backlink column width to settings
- Add: Reference container: separating and terminating punctuation optional and customizable
- Add: Reference container: Backlinks: optional line breaks to stack enumerations
- Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers
- Bugfix: Scroll duration: make configurable to conform to website content and style requirements
- Bugfix: Tooltips: make display delays and fade durations configurable to conform to website style
- Bugfix: Styling: Tooltips: fix font size issue by adding font size to settings with legacy as default
- Bugfix: Reference container: fix layout by optionally enqueuing additional style sheet (depends on theme)
- Bugfix: Reference container: fix layout issues by moving backlink column width to settings
- Bugfix: Reference container: make separating and terminating punctuation optional and configurable
- Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks
- Bugfix: Layout: Tooltips: prevent line break in Read-on link label
- Bugfix: Styling: Referrers and backlinks: make link elements optional to fix issues
- Bugfix: Styling: Referrers: disable hover underline
@ -265,6 +274,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
- Update: UX: Tooltip: set display predelay to 0 for responsiveness (was 800 since 2.0.0, 400 before)
- Update: UX: Tooltip: set fade duration to 200ms both ways (was 200 in and 2000 out since 2.0.0, 0 in and 100 out before)
- BUGFIX: Priority level back to PHP_INT_MAX (ref container positioning not this plugins responsibility)
- Update: Scroll offset: raise percentage from 12% to a safer 20% inner window height, by lack of configurability
= 2.0.5 =
- Bugfix: Get references container close to content, not below all other features, by priority level 10
@ -291,6 +301,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
- Bugfix: Print style: prevent a page break just after the reference container label
- Bugfix: Print style: Hide reference collapse button
- Update: Layout: Removed padding before reference container label
- Update: Scroll offset: raise percentage from 5% to a safer 12% inner window height, by lack of configurability
= 2.0.2 =
- Bugfix: Restored expand/collapse button of reference container

View file

@ -1,7 +1,7 @@
<div class="footnotes_description">
<p>[[description-css]]</p>
</div>
<table id="customize_css_migration" class="widefat fixed">
<table class="customize_css_migration widefat fixed">
<tbody>
<tr>
<td>[[label-css]]</td>

View file

@ -1,4 +1,4 @@
<table id="customize_css_new" class="widefat fixed">
<table class="customize_css_new widefat fixed">
<tbody>
<tr>
<td><span>[[headline]]</span><br />

View file

@ -1,7 +1,7 @@
<div class="footnotes_description">
<p>[[description-css]]</p>
</div>
<table id="customize_css" class="widefat fixed">
<table class="customize_css widefat fixed">
<tbody>
<tr>
<td>[[label-css]]</td>

View file

@ -1,7 +1,7 @@
<div class="footnotes_description">
<p>[[description-symbol]]</p>
</div>
<table id="customize_hyperlink_arrow" class="widefat fixed">
<table class="customize_hyperlink_arrow widefat fixed">
<tbody>
<tr>
<td>[[label-symbol]]</td>

View file

@ -1,4 +1,4 @@
<table id="customize_superscript" class="widefat fixed">
<table class="customize_superscript widefat fixed">
<tbody>
<tr>
<td>[[label-superscript]]</td>

View file

@ -1,4 +1,4 @@
<table id="diagnostics" class="widefat fixed">
<table class="diagnostics widefat fixed">
<tbody>
<tr>
<td>[[label-server]]</td>

View file

@ -3,7 +3,7 @@
<p>[[description-2]]</p>
<p>[[description-3]]</p>
</div>
<table id="expert_lookup" class="widefat fixed">
<table class="expert_lookup widefat fixed">
<thead>
<tr>
<th>[[head-hook]]</th>

View file

@ -1,4 +1,4 @@
<table id="mouse_over_box_appearance" class="widefat fixed">
<table class="mouse_over_box_appearance widefat fixed">
<tbody>
<tr>
<td>[[label-font-size]]</td>

View file

@ -1,4 +1,4 @@
<table id="mouse_over_box_display" class="widefat fixed">
<table class="mouse_over_box_display widefat fixed">
<tbody>
<tr>
<td>[[label-enable]]</td>

View file

@ -1,4 +1,4 @@
<table id="mouse_over_box_position" class="widefat fixed">
<table class="mouse_over_box_position widefat fixed">
<tbody>
<tr>
<td>[[label-position]]</td>

View file

@ -1,4 +1,4 @@
<table id="mouse_over_box_timing" class="widefat fixed">
<table class="mouse_over_box_timing widefat fixed">
<tbody>
<tr>
<td>[[label-fade-in-delay]]</td>

View file

@ -1,4 +1,4 @@
<table id="mouse_over_box_truncation" class="widefat fixed">
<table class="mouse_over_box_truncation widefat fixed">
<tbody>
<tr>
<td>[[label-truncation]]</td>

View file

@ -1,4 +1,4 @@
<table id="settings_excerpts" class="widefat fixed">
<table class="settings_excerpts widefat fixed">
<tbody>
<tr>
<td>[[label-excerpts]]</td>

View file

@ -1,4 +1,4 @@
<table id="settings_love" class="widefat fixed">
<table class="settings_love widefat fixed">
<tbody>
<tr>
<td>[[label-love]]</td>

View file

@ -1,4 +1,4 @@
<table id="settings_numbering" class="widefat fixed">
<table class="settings_numbering widefat fixed">
<tbody>
<tr>
<td>[[label-counter-style]]</td>

View file

@ -1,4 +1,4 @@
<table id="settings_reference_container" class="widefat fixed">
<table class="settings_reference_container widefat fixed">
<tbody>
<tr>
<td>[[label-name]]</td>

View file

@ -1,4 +1,4 @@
<table id="settings_scrolling" class="widefat fixed">
<table class="settings_scrolling widefat fixed">
<tbody>
<tr>
<td>[[label-scroll-offset]]</td>

View file

@ -1,4 +1,7 @@
<table id="settings_start_end" class="widefat fixed">
<div class="footnotes_description">
<p>[[description-escapement]]</p>
</div>
<table class="settings_start_end widefat fixed">
<tbody>
<tr>
<td>[[label-short-code-start]]</td>
@ -14,12 +17,22 @@
<span>[[short-code-end-user]]</span>
</td>
</tr>
</tbody>
</table>
<div class="footnotes_description">
<p>[[description-parentheses]]</p>
</div>
<table class="settings_start_end widefat fixed">
<tbody>
<tr>
<td>[[label-syntax]]</td>
<td>[[syntax]] <span class="footnotes_notice">[[notice-syntax]]</span></td>
</tr>
</tbody>
</table>
<div class="footnotes_description">
<p>[[description-syntax]]</p>
</div>
<script type="text/javascript">
var l_obj_ShortCodeStart = jQuery("#[[short-code-start-id]]");
var l_obj_ShortCodeEnd = jQuery("#[[short-code-end-id]]");

View file

@ -1,6 +1,6 @@
note-for-developers.txt
2020-12-19T0609+0100
Last modified: 2021-01-01T2249+0100
Last modified: 2021-01-04T1734+0100
Footnotes plugin for WordPress, v2.2.6 and later
@ -10,7 +10,7 @@ Support for custom templates
Since v2.2.6, Footnotes supports custom templates.
Custom templates may be loaded from a sibling folder 'footnotes-custom'
or since v2.3.1 from a folder 'templates/footnotes/' in the active theme.
or since v2.4.0 from a folder 'templates/footnotes/' in the active theme.
Priority order:
1. active theme