Unreleased bugfix v2.5.13 with Stable Tag 2.5.10.
= 2.5.13 = - Bugfix: Dashboard: Backlink symbol: debug select box by reverting identity check to equality check, thanks to @lolzim bug report. - Bugfix: Footnote delimiter short codes: debug closing pointy brackets in the Block Editor by accounting for unbalanced HTML escapement. - Update: Dashboard: General settings: Footnote start and end short codes: update information about short codes using pointy brackets. git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2502882 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
9e8e28412e
commit
0dc4c08dd8
10 changed files with 412 additions and 422 deletions
|
@ -211,7 +211,7 @@ abstract class MCI_Footnotes_Layout_Engine {
|
|||
* automated update of version number for cache busting.
|
||||
* No need to use '-styles' in the handle, as '-css' is appended automatically.
|
||||
*/
|
||||
if ( C_BOOL_CSS_PRODUCTION_MODE === true ) {
|
||||
if ( true === C_BOOL_CSS_PRODUCTION_MODE ) {
|
||||
|
||||
wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_PACKAGE_VERSION );
|
||||
|
||||
|
@ -458,8 +458,14 @@ abstract class MCI_Footnotes_Layout_Engine {
|
|||
* Returns the html tag for a select box.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @param string $p_str_setting_name Name of the Settings key to pre select the current value.
|
||||
* @param array $p_arr_options Possible options to be selected.
|
||||
*
|
||||
* - Bugfix: Dashboard: Backlink symbol: debug select box by reverting identity check to equality check, thanks to @lolzim bug report.
|
||||
*
|
||||
* @reporter @lolzim
|
||||
*
|
||||
* @since 2.5.13
|
||||
* @param string $p_str_setting_name Name of the Settings key to pre select the current value.
|
||||
* @param array $p_arr_options Possible options to be selected.
|
||||
* @return string
|
||||
*/
|
||||
protected function add_select_box( $p_str_setting_name, $p_arr_options ) {
|
||||
|
@ -467,11 +473,14 @@ abstract class MCI_Footnotes_Layout_Engine {
|
|||
$l_arr_data = $this->load_setting( $p_str_setting_name );
|
||||
$l_str_options = '';
|
||||
|
||||
// Loop through all array keys.
|
||||
foreach ( $p_arr_options as $l_str_value => $l_str_caption ) {
|
||||
$l_str_options .= sprintf(
|
||||
'<option value="%s" %s>%s</option>',
|
||||
$l_str_value,
|
||||
$l_str_value === $l_arr_data['value'] ? 'selected' : '',
|
||||
|
||||
// Only check for equality, not identity, WRT arrows.
|
||||
$l_str_value == $l_arr_data['value'] ? 'selected' : '',
|
||||
$l_str_caption
|
||||
);
|
||||
}
|
||||
|
|
|
@ -179,12 +179,12 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine {
|
|||
$l_obj_template->replace(
|
||||
array(
|
||||
// Translators: '%s' is the link text 'AMP-WP' linked to the plugin’s front page on WordPress.org.
|
||||
'description-1-amp' => sprintf( __( 'The official %s plugin is required when this option is enabled.', 'footnotes' ), '<span style="font-style: normal;"><a href="https://wordpress.org/plugins/amp/">AMP-WP</a></span>' ),
|
||||
'description-1-amp' => sprintf( __( 'The official %s plugin is required when this option is enabled.', 'footnotes' ), '<a href="https://wordpress.org/plugins/amp/" target="_blank" style="font-style: normal;">AMP-WP</a>' ),
|
||||
'label-amp' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE, __( 'Enable AMP compatibility mode:', 'footnotes' ) ),
|
||||
'amp' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE ),
|
||||
'notice-amp' => __( 'This option enables hard links with configurable scroll offset in % window height.', 'footnotes' ),
|
||||
'notice-amp' => __( 'This option enables hard links with configurable scroll offset in % viewport height.', 'footnotes' ),
|
||||
// Translators: '%s' is the logogram of the 'Footnotes' plugin.
|
||||
'description-2-amp' => sprintf( __( '%s shall become AMP compatible thanks to @milindmore22 and @westonruter code contributions.', 'footnotes' ), '<span style="font-style: normal;">' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '</span>' ),
|
||||
'description-2-amp' => sprintf( __( '%s shall become AMP compatible thanks to @milindmore22 and @westonruter code contributions. [After the related items are added to the changelog, a more detailed feature description shall replace this provisional announcement.]', 'footnotes' ), '<span style="font-style: normal;">' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '</span>' ),
|
||||
)
|
||||
);
|
||||
// Display template with replaced placeholders.
|
||||
|
@ -423,7 +423,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine {
|
|||
$l_obj_template->replace(
|
||||
array(
|
||||
|
||||
'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.', 'footnotes' ),
|
||||
'description-escapement' => __( 'CAUTION: When using short codes with pointy brackets, all footnotes should be added in the same editor and mode. Short codes are processed 1st with balanced escapement (Classic Editor), 2nd with unbalanced escapement (Block Editor), and 3rd without escapement (text mode).', 'footnotes' ),
|
||||
|
||||
'label-short-code-start' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __( 'Footnote start tag short code:', 'footnotes' ) ),
|
||||
'short-code-start' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_shortcode_start ),
|
||||
|
@ -525,7 +525,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine {
|
|||
|
||||
'label-scroll-offset' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __( 'Scroll offset:', 'footnotes' ) ),
|
||||
'scroll-offset' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100 ),
|
||||
'notice-scroll-offset' => __( 'per cent from the upper edge of the window', 'footnotes' ),
|
||||
'notice-scroll-offset' => __( 'per cent from the upper edge of the viewport', 'footnotes' ),
|
||||
|
||||
'label-scroll-duration' => $this->add_label( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __( 'Scroll duration:', 'footnotes' ) ),
|
||||
'scroll-duration' => $this->add_num_box( MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000 ),
|
||||
|
@ -685,8 +685,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine {
|
|||
'label-excerpts' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, __( 'Display footnotes in excerpts:', 'footnotes' ) ),
|
||||
'excerpts' => $this->add_select_box( MCI_Footnotes_Settings::C_STR_FOOTNOTES_IN_EXCERPT, $l_arr_enabled ),
|
||||
'notice-excerpts' => __( 'The recommended value is No.', 'footnotes' ),
|
||||
// Translators: %s: link to the Advanced Excerpt Plugin.
|
||||
'description-excerpts' => sprintf( __( 'In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.', 'footnotes' ), '<a href="https://wordpress.org/plugins/advanced-excerpt/" target="_blank">Advanced Excerpt</a>' ),
|
||||
// Translators: %s: link text 'Advanced Excerpt' linked to the plugin’s WordPress.org front page.
|
||||
'description-excerpts' => sprintf( __( 'In some themes, the %s plugin is indispensable to display footnotes in excerpts. Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.', 'footnotes' ), '<a href="https://wordpress.org/plugins/advanced-excerpt/" target="_blank" style="font-style: normal;">Advanced Excerpt</a>' ),
|
||||
)
|
||||
);
|
||||
// Display template with replaced placeholders.
|
||||
|
|
|
@ -340,7 +340,7 @@ class MCI_Footnotes {
|
|||
* The Boolean may be set at the bottom of the plugin’s main PHP file.
|
||||
* @see footnotes.php
|
||||
*/
|
||||
if ( C_BOOL_CSS_PRODUCTION_MODE === true ) {
|
||||
if ( true === C_BOOL_CSS_PRODUCTION_MODE ) {
|
||||
|
||||
/**
|
||||
* Enqueues a minified united external stylesheet in production.
|
||||
|
|
|
@ -7,47 +7,11 @@
|
|||
* @since 1.5.0
|
||||
* @date 14.09.14 10:43
|
||||
*
|
||||
* The constants are ordered by ascending version so their docblocks can replace most of this list.
|
||||
* @since 2.0.0 Update: **symbol for backlinks** removed; hyperlink moved to the reference number.
|
||||
* @since 2.0.4 Update: Restore arrow settings to customize or disable the now prepended arrow symbol, thanks to @mmallett issue report.
|
||||
* @since 2.0.7 BUGFIX: Hooks: Default-disable 'the_post', thanks to @spaceling @markcheret @nyamachi @whichgodsaves @spiralofhope2 @mmallett @andreasra @widecast @ymorin007 @tashi1es bug reports.
|
||||
* @since 2.1.3 Bugfix: Hooks: disable the_excerpt hook by default to fix issues, thanks to @nikelaos bug report.
|
||||
*
|
||||
* **Revision of the docblocks is in progress.**
|
||||
*
|
||||
* @since 2.1.3 fix ref container positioning by priority level 2020-11-17T0205+0100
|
||||
*
|
||||
* @since 2.1.4 more settings container keys 2020-12-03T0955+0100
|
||||
*
|
||||
* @since 2.1.6 option to disable URL line wrapping 2020-12-09T1606+0100
|
||||
*
|
||||
* @since 2.1.6 set default priority level of the_content to 98 to prevent plugin conflict, thanks to @marthalindeman 2020-12-10T0447+0100
|
||||
*
|
||||
* @since 2.2.0 reference container custom position shortcode, thanks to @hamshe 2020-12-13T2056+0100
|
||||
* @link https://wordpress.org/support/topic/reference-container-in-elementor/
|
||||
*
|
||||
* @since 2.2.2 Custom CSS settings container migration 2020-12-15T0709+0100
|
||||
*
|
||||
* @since 2.2.4 move backlink symbol selection under previous tab 2020-12-16T1256+0100
|
||||
*
|
||||
* @since 2.2.5 alternative tooltip position settings 2020-12-17T0907+0100
|
||||
*
|
||||
* @since 2.2.5 options for reference container label element and bottom border, thanks to @markhillyer 2020-12-18T1455+0100
|
||||
* @link 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
|
||||
* @link https://wordpress.org/support/topic/borders-25/
|
||||
*
|
||||
* @since 2.3.0 reference container: settings for top (and bottom) margin, thanks to @hamshe
|
||||
* @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13786635
|
||||
*
|
||||
* @since 2.3.0 Bugfix: Dashboard: Custom CSS: swap migration Boolean, meaning 'show legacy' instead of 'migration complete', due to storage data structure constraints.
|
||||
* @date 2020-12-27T1243+0100
|
||||
|
||||
* @since 2.3.0 referrers, reference container: settings for anchor slugs 2020-12-31T1429+0100
|
||||
*
|
||||
* @since 2.4.0 footnote shortcode syntax validation 2021-01-01T0624+0100
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -135,15 +99,15 @@ class MCI_Footnotes_Settings {
|
|||
* Settings container key for the backlink symbol selection.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @var str
|
||||
*
|
||||
* - Update: Restore arrow settings to customize or disable the now prepended arrow symbol, thanks to @mmallett issue report.
|
||||
*
|
||||
* @since 2.0.4
|
||||
* @date 2020-11-02T2115+0100
|
||||
*
|
||||
* @reporter @mmallett
|
||||
* @link https://wordpress.org/support/topic/mouse-over-broken/#post-13593037
|
||||
*
|
||||
* @since 2.0.4
|
||||
* @date 2020-11-02T2115+0100
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_HYPERLINK_ARROW = 'footnote_inputfield_custom_hyperlink_symbol';
|
||||
|
||||
|
@ -158,13 +122,13 @@ class MCI_Footnotes_Settings {
|
|||
/**
|
||||
* Settings container key to look for footnotes in post excerpts.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @var str
|
||||
*
|
||||
* - Bugfix: Hooks: disable the_excerpt hook by default to fix issues, thanks to @nikelaos bug report.
|
||||
*
|
||||
* @reporter @nikelaos
|
||||
* @link https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_IN_EXCERPT = 'footnote_inputfield_search_in_excerpt';
|
||||
|
||||
|
@ -180,6 +144,7 @@ class MCI_Footnotes_Settings {
|
|||
* - as in English or US American typesetting;
|
||||
* - for better UX thanks to a more button-like appearance;
|
||||
* - for stylistic consistency with the expand-collapse button.
|
||||
*
|
||||
*/
|
||||
const C_STR_FOOTNOTES_STYLING_BEFORE = 'footnote_inputfield_custom_styling_before';
|
||||
|
||||
|
@ -198,7 +163,6 @@ class MCI_Footnotes_Settings {
|
|||
* @var str
|
||||
*
|
||||
* @since 1.3.0 Adding: new settings tab for custom CSS settings.
|
||||
* Custom CSS migrates to a dedicated tab.
|
||||
*/
|
||||
const C_STR_CUSTOM_CSS = 'footnote_inputfield_custom_css';
|
||||
|
||||
|
@ -223,9 +187,10 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @since 1.5.4
|
||||
* @var str
|
||||
* The mouse over content truncation should be enabled by default.
|
||||
* To raise awareness of the functionality and to prevent the screen.
|
||||
* From being filled at mouse-over, and to allow the Continue reading.
|
||||
*
|
||||
* The mouse over content truncation should be enabled by default
|
||||
* to raise awareness of the functionality and to prevent the screen
|
||||
* from being filled at mouse-over, and to allow the Continue reading.
|
||||
*/
|
||||
const C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED = 'footnote_inputfield_custom_mouse_over_box_excerpt_enabled';
|
||||
|
||||
|
@ -233,8 +198,9 @@ class MCI_Footnotes_Settings {
|
|||
* Settings container key for the mouse-over box to define the max. length of the enabled excerpt.
|
||||
*
|
||||
* @since 1.5.4
|
||||
* @var str
|
||||
* The truncation length is raised from 150 to 200 chars.
|
||||
* @var int
|
||||
*
|
||||
* @since 2.0.7 Increase default truncation length from 150 to 200 chars.
|
||||
*/
|
||||
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH = 'footnote_inputfield_custom_mouse_over_box_excerpt_length';
|
||||
|
||||
|
@ -243,13 +209,17 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @since 1.5.5
|
||||
* @var str
|
||||
* These are checkboxes; keyword 'checked' is converted to Boolean true,.
|
||||
* Empty string to false (default).
|
||||
* Titles should all be enabled by default to prevent users from.
|
||||
* Thinking at first that the feature is broken in post titles..
|
||||
* See <https://wordpress.org/support/topic/more-feature-ideas/>.
|
||||
* Yet in titles, footnotes are still buggy, because WordPress.
|
||||
* Uses the title string in menus and in the title element..
|
||||
*
|
||||
* These are checkboxes; keyword 'checked' is converted to Boolean true,
|
||||
* empty string to false (default).
|
||||
*
|
||||
* Hooks should all be enabled by default to prevent users from
|
||||
* thinking at first that the feature is broken in post titles.
|
||||
* @link https://wordpress.org/support/topic/more-feature-ideas/
|
||||
*
|
||||
* Yet in titles, footnotes are still buggy, because WordPress
|
||||
* uses the title string in menus and in the title element, but
|
||||
* Footnotes doesn’t delete footnotes therein.
|
||||
*/
|
||||
const C_STR_EXPERT_LOOKUP_THE_TITLE = 'footnote_inputfield_expert_lookup_the_title';
|
||||
|
||||
|
@ -265,13 +235,16 @@ class MCI_Footnotes_Settings {
|
|||
* Settings container key to enable the 'the_excerpt' hook.
|
||||
*
|
||||
* @since 1.5.5
|
||||
* @var str
|
||||
*
|
||||
* @since 2.1.3 excerpt hook: disable by default, thanks to @nikelaos
|
||||
* - Bugfix: Hooks: disable the_excerpt hook by default to fix issues, thanks to @nikelaos bug report.
|
||||
*
|
||||
* @reporter @nikelaos
|
||||
* @link https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068
|
||||
* And the_excerpt is disabled by default following @nikelaos in.
|
||||
* <https://wordpress.org/support/topic/jquery-comes-up-in-feed-content/#post-13110879>.
|
||||
* <https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068>.
|
||||
* @link https://wordpress.org/support/topic/jquery-comes-up-in-feed-content/#post-13110879
|
||||
* @link https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068
|
||||
*
|
||||
* @since 2.1.3
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_EXPERT_LOOKUP_THE_EXCERPT = 'footnote_inputfield_expert_lookup_the_excerpt';
|
||||
|
||||
|
@ -288,10 +261,11 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @since 1.5.5
|
||||
* @var str
|
||||
* The widget_text hook must be disabled by default, because it causes.
|
||||
* Multiple reference containers to appear in Elementor accordions, but.
|
||||
* It must be enabled if multiple reference containers are desired, as.
|
||||
* In Elementor toggles..
|
||||
*
|
||||
* The widget_text hook must be disabled by default, because it causes
|
||||
* multiple reference containers to appear in Elementor accordions, but
|
||||
* it must be enabled if multiple reference containers are desired, as
|
||||
* in Elementor toggles.
|
||||
*/
|
||||
const C_STR_EXPERT_LOOKUP_WIDGET_TEXT = 'footnote_inputfield_expert_lookup_widget_text';
|
||||
|
||||
|
@ -322,21 +296,23 @@ class MCI_Footnotes_Settings {
|
|||
* Settings container key for the mouse-over box to define the background color.
|
||||
*
|
||||
* @since 1.5.6
|
||||
* @var str
|
||||
*
|
||||
* - Bugfix: Tooltips: Styling: Background color: empty default value to adopt theme background, thanks to 4msc bug report.
|
||||
*
|
||||
* @since 2.5.11
|
||||
*
|
||||
* @reporter @4msc
|
||||
* @link https://wordpress.org/support/topic/tooltip-not-showing-on-dark-theme-with-white-text/
|
||||
*
|
||||
* 1.2.5..1.5.5 #fff7a7 hard-coded
|
||||
* 1.5.6..2.0.6 #fff7a7 setting default
|
||||
* 2.0.7..2.5.10 #ffffff setting default
|
||||
* @since 2.5.11
|
||||
*
|
||||
* The mouse over box shouldn’t feature a colored background.
|
||||
* By default, due to diverging user preferences. White is neutral.
|
||||
* Theme default background color is best.
|
||||
*
|
||||
* @since 1.2.5..1.5.5 #fff7a7 hard-coded.
|
||||
* @since 1.5.6..2.0.6 #fff7a7 setting default.
|
||||
* @since 2.0.7..2.5.10 #ffffff setting default.
|
||||
*
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND = 'footnote_inputfield_custom_mouse_over_box_background';
|
||||
|
||||
|
@ -344,7 +320,7 @@ class MCI_Footnotes_Settings {
|
|||
* Settings container key for the mouse-over box to define the border width.
|
||||
*
|
||||
* @since 1.5.6
|
||||
* @var str
|
||||
* @var int
|
||||
*/
|
||||
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH = 'footnote_inputfield_custom_mouse_over_box_border_width';
|
||||
|
||||
|
@ -360,8 +336,9 @@ class MCI_Footnotes_Settings {
|
|||
* Settings container key for the mouse-over box to define the border radius.
|
||||
*
|
||||
* @since 1.5.6
|
||||
* @var str
|
||||
* The mouse over box corners mustn’t be rounded as that is outdated.
|
||||
* @var int
|
||||
*
|
||||
* @since 2.0.7 The mouse over box corners mustn’t be rounded as that is outdated.
|
||||
*/
|
||||
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS = 'footnote_inputfield_custom_mouse_over_box_border_radius';
|
||||
|
||||
|
@ -369,7 +346,9 @@ class MCI_Footnotes_Settings {
|
|||
* Settings container key for the mouse-over box to define the max. width.
|
||||
*
|
||||
* @since 1.5.6
|
||||
* @var str
|
||||
* @var int
|
||||
*
|
||||
* @since 2.0.7 Set default width 450.
|
||||
* The width should be limited to start with, for the box to have shape.
|
||||
*/
|
||||
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH = 'footnote_inputfield_custom_mouse_over_box_max_width';
|
||||
|
@ -379,9 +358,10 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @since 1.5.7
|
||||
* @var str
|
||||
* The default position should not be lateral because of the risk.
|
||||
* The box gets squeezed between note anchor at line end and window edge,.
|
||||
* And top because reading at the bottom of the window is more likely.
|
||||
*
|
||||
* The default position should not be lateral because of the risk
|
||||
* the box gets squeezed between note anchor at line end and window edge,
|
||||
* and top because reading at the bottom of the window is more likely.
|
||||
*/
|
||||
const C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION = 'footnote_inputfield_custom_mouse_over_box_position';
|
||||
|
||||
|
@ -389,7 +369,7 @@ class MCI_Footnotes_Settings {
|
|||
* Settings container key for the mouse-over box to define the offset (x).
|
||||
*
|
||||
* @since 1.5.7
|
||||
* @var str
|
||||
* @var int
|
||||
*/
|
||||
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X = 'footnote_inputfield_custom_mouse_over_box_offset_x';
|
||||
|
||||
|
@ -397,8 +377,9 @@ class MCI_Footnotes_Settings {
|
|||
* Settings container key for the mouse-over box to define the offset (y).
|
||||
*
|
||||
* @since 1.5.7
|
||||
* @var str
|
||||
* The vertical offset must be negative for the box not to cover.
|
||||
* @var int
|
||||
*
|
||||
* The vertical offset must be negative for the box not to cover
|
||||
* The current line of text (web coordinates origin is top left).
|
||||
*/
|
||||
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y = 'footnote_inputfield_custom_mouse_over_box_offset_y';
|
||||
|
@ -416,12 +397,11 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @date 2020-11-08T2106+0100
|
||||
*
|
||||
* @reporter @rovanov
|
||||
* @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @date 2020-11-08T2106+0100
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_TOOLTIP_READON_LABEL = 'footnote_inputfield_readon_label';
|
||||
|
@ -431,12 +411,11 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* - Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback.
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @date 2020-11-11T1817+0100
|
||||
*
|
||||
* @reporter @andreasra
|
||||
* @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @date 2020-11-11T1817+0100
|
||||
* @var str
|
||||
*
|
||||
* These alternative tooltips work around a website related jQuery UI
|
||||
|
@ -451,12 +430,11 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* - Bugfix: Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report.
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @date 2020-11-16T0859+0100
|
||||
*
|
||||
* @reporter @cwbayer
|
||||
* @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @date 2020-11-16T0859+0100
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS = 'footnotes_inputfield_referrer_superscript_tags';
|
||||
|
@ -466,12 +444,11 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* - Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback.
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @date 2020-11-16T2021+0100
|
||||
*
|
||||
* @reporter @spaceling
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13671138
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @date 2020-11-16T2021+0100
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE = 'footnotes_inputfield_reference_container_backlink_symbol_enable';
|
||||
|
@ -481,11 +458,10 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* - Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report.
|
||||
*
|
||||
* @since 2.1.1
|
||||
*
|
||||
* @reporter @dragon013
|
||||
* @link https://wordpress.org/support/topic/possible-to-hide-it-from-start-page/
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE = 'footnotes_inputfield_reference_container_start_page_enable';
|
||||
|
@ -505,12 +481,11 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* - Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution.
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @date 2020-11-16T2024+0100
|
||||
*
|
||||
* @contributor @spaceling
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/#post-13615994
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @date 2020-11-16T2024+0100
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH = 'footnotes_inputfield_reference_container_backlink_symbol_switch';
|
||||
|
@ -518,29 +493,67 @@ class MCI_Footnotes_Settings {
|
|||
/**
|
||||
* Settings container key for 'the_content' hook priority level.
|
||||
*
|
||||
* - Bugfix: Reference container: fix relative position through priority level, thanks to @june01 @imeson @spaceling bug reports, thanks to @spaceling code contribution.
|
||||
*
|
||||
* @contributor @spaceling
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/#post-13608594
|
||||
*
|
||||
* @reporter @june01
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/
|
||||
*
|
||||
* @reporter @imeson
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/#post-13538345
|
||||
*
|
||||
* @since 2.0.5
|
||||
* @date 2020-11-02T0330+0100
|
||||
* @link https://codex.wordpress.org/Plugin_API/#Hook_in_your_Filter
|
||||
*
|
||||
* - Bugfix: Dashboard: priority level setting for the_content hook, thanks to @imeson bug report.
|
||||
*
|
||||
* @reporter @imeson
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/#post-13538345
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @date 2020-11-16T0859+0100
|
||||
*
|
||||
* - Bugfix: Priority levels: set the_content priority level to 98 to prevent plugin conflict, thanks to @marthalindeman bug report.
|
||||
*
|
||||
* @reporter @marthalindeman
|
||||
* @link https://wordpress.org/support/topic/code-showing-up-in-references/
|
||||
*
|
||||
* @since 2.1.6
|
||||
* @date 2020-12-10T0447+0100
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* @var str
|
||||
* 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..
|
||||
* 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
|
||||
* features added by other plugins, e.g. related post lists and social buttons.
|
||||
*
|
||||
* For YARPP to display related posts below the Footnotes reference container,
|
||||
* priority needs to be at least 1200 (i.e. 0 =< $l_int_the_content_priority =< 1200).
|
||||
*
|
||||
* PHP_INT_MAX cannot be reset by leaving the number box empty. because browsers
|
||||
* (WebKit) don’t allow it, so we must resort to -1.
|
||||
* @link https://github.com/Modernizr/Modernizr/issues/171
|
||||
* @var int
|
||||
*/
|
||||
const C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_the_content_priority_level';
|
||||
|
||||
|
||||
/**
|
||||
* Settings container key for 'the_title' hook priority level.
|
||||
*
|
||||
* - Bugfix: Dashboard: priority level settings for all other hooks, thanks to @nikelaos bug report.
|
||||
*
|
||||
* @reporter @nikelaos
|
||||
* @link https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13676705
|
||||
*
|
||||
* @since 2.1.2
|
||||
* @date 2020-11-20T0620+0100
|
||||
*
|
||||
* @var str
|
||||
* Initially hard-coded default.
|
||||
* Shows "9223372036854780000" instead of 9223372036854775807 in the numbox.
|
||||
* Empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty.
|
||||
* <https://github.com/Modernizr/Modernizr/issues/171>.
|
||||
* Interpret -1 as PHP_INT_MAX instead.
|
||||
* @var int
|
||||
*/
|
||||
const C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_the_title_priority_level';
|
||||
|
||||
|
@ -549,8 +562,7 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @since 2.1.2
|
||||
* @date 2020-11-20T0620+0100
|
||||
*
|
||||
* @var str
|
||||
* @var int
|
||||
*/
|
||||
const C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_widget_title_priority_level';
|
||||
|
||||
|
@ -559,8 +571,7 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @since 2.1.2
|
||||
* @date 2020-11-20T0620+0100
|
||||
*
|
||||
* @var str
|
||||
* @var int
|
||||
*/
|
||||
const C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_widget_text_priority_level';
|
||||
|
||||
|
@ -569,28 +580,35 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @since 2.1.2
|
||||
* @date 2020-11-20T0620+0100
|
||||
*
|
||||
* @var str
|
||||
* @var int
|
||||
*/
|
||||
const C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_the_excerpt_priority_level';
|
||||
|
||||
/**
|
||||
* Settings container key for the link element option.
|
||||
*
|
||||
* - Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues, thanks to @docteurfitness issue report and code contribution.
|
||||
*
|
||||
* @contributor @docteurfitness
|
||||
* @link https://wordpress.org/support/topic/update-2-1-3/#post-13704194
|
||||
*
|
||||
* @since 2.1.4
|
||||
* @var str
|
||||
* Whether to use link elements.
|
||||
* Link element option.
|
||||
*/
|
||||
const C_STR_LINK_ELEMENT_ENABLED = 'footnote_inputfield_link_element_enabled';
|
||||
|
||||
/**
|
||||
* Settings container key to enable the presence of a backlink separator.
|
||||
*
|
||||
* - Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution.
|
||||
*
|
||||
* @contributor @docteurfitness
|
||||
* @link https://wordpress.org/support/topic/update-2-1-3/#post-13704194
|
||||
*
|
||||
* @since 2.1.4
|
||||
* @var str
|
||||
* Backlink typography.
|
||||
* Backlink separators and terminators are often not preferred..
|
||||
*
|
||||
* Backlink separators and terminators are often not preferred.
|
||||
* But a choice must be provided along with the ability to customize.
|
||||
*/
|
||||
const C_STR_BACKLINKS_SEPARATOR_ENABLED = 'footnotes_inputfield_backlinks_separator_enabled';
|
||||
|
@ -640,8 +658,6 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @since 2.1.4
|
||||
* @var str
|
||||
* Set backlinks column width.
|
||||
* Backlink layout.
|
||||
*/
|
||||
const C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED = 'footnotes_inputfield_backlinks_column_width_enabled';
|
||||
|
||||
|
@ -698,12 +714,12 @@ class MCI_Footnotes_Settings {
|
|||
* Settings container key to enable setting the tooltip font size.
|
||||
*
|
||||
* @since 2.1.4
|
||||
* @date 2020-12-04T1023+0100.
|
||||
* @var str
|
||||
* Tooltip font size.
|
||||
*
|
||||
* Tooltip font size reset to legacy by default since 2.1.4;
|
||||
* Was set to inherit since 2.1.1 as it overrode custom CSS,
|
||||
* Called mouse over box not tooltip for consistency.
|
||||
* Tooltip font size reset to legacy by default since 2.1.4;.
|
||||
* Was set to inherit since 2.1.1 as it overrode custom CSS,.
|
||||
* Is moved to settings since 2.1.4 2020-12-04T1023+0100.
|
||||
*/
|
||||
const C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED = 'footnotes_inputfield_mouse_over_box_font_size_enabled';
|
||||
|
||||
|
@ -728,8 +744,7 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @since 2.1.4
|
||||
* @var str
|
||||
* Whether to enqueue additional stylesheet.
|
||||
* Page layout support.
|
||||
* Whether to concatenate an additional stylesheet.
|
||||
*/
|
||||
const C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT = 'footnotes_inputfield_page_layout_support';
|
||||
|
||||
|
@ -761,7 +776,6 @@ class MCI_Footnotes_Settings {
|
|||
* @since 2.1.4
|
||||
* @date 2020-12-05T0538+0100
|
||||
* @var int
|
||||
* Called mouse over box not tooltip for consistency.
|
||||
*/
|
||||
const C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY = 'footnotes_inputfield_mouse_over_box_fade_in_delay';
|
||||
|
||||
|
@ -799,7 +813,7 @@ class MCI_Footnotes_Settings {
|
|||
* Unicode-compliant browsers break URLs at slashes.
|
||||
*
|
||||
* @since 2.1.6
|
||||
* @date 2020-12-09T1554+0100..2020-12-13T1313+0100
|
||||
* @date 2020-12-09T1606+0100
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTE_URL_WRAP_ENABLED = 'footnote_inputfield_url_wrap_enabled';
|
||||
|
@ -807,6 +821,11 @@ class MCI_Footnotes_Settings {
|
|||
/**
|
||||
* Settings container key for reference container position shortcode.
|
||||
*
|
||||
* - Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report.
|
||||
*
|
||||
* @reporter @hamshe
|
||||
* @link https://wordpress.org/support/topic/reference-container-in-elementor/
|
||||
*
|
||||
* @since 2.2.0
|
||||
* @date 2020-12-13T2056+0100
|
||||
* @var str
|
||||
|
@ -816,7 +835,9 @@ class MCI_Footnotes_Settings {
|
|||
/**
|
||||
* Settings container key for the Custom CSS migrated to a dedicated tab.
|
||||
*
|
||||
* @since 2.2.2 Bugfix: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed.
|
||||
* - Update: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed.
|
||||
*
|
||||
* @since 2.2.2
|
||||
* @date 2020-12-15T0520+0100
|
||||
* @var str
|
||||
*/
|
||||
|
@ -829,7 +850,9 @@ class MCI_Footnotes_Settings {
|
|||
* @date 2020-12-15T0520+0100
|
||||
* @var str
|
||||
*
|
||||
* @since 2.3.0 swap Boolean from 'migration complete' to 'show legacy'
|
||||
* - Bugfix: Dashboard: Custom CSS: swap migration Boolean, meaning 'show legacy' instead of 'migration complete', due to storage data structure constraints.
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @date 2020-12-27T1233+0100
|
||||
*
|
||||
* The Boolean must be false if its setting is contained in the container to be hidden,
|
||||
|
@ -924,7 +947,7 @@ class MCI_Footnotes_Settings {
|
|||
* - Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report.
|
||||
*
|
||||
* @reporter @hamshe
|
||||
* @link https://wordpress.org/support/topic/reference-container-in-elementor/
|
||||
* @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13786635
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @date 2020-12-29T0914+0100
|
||||
|
@ -938,7 +961,7 @@ class MCI_Footnotes_Settings {
|
|||
* - Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report.
|
||||
*
|
||||
* @reporter @hamshe
|
||||
* @link https://wordpress.org/support/topic/reference-container-in-elementor/
|
||||
* @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13786635
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @date 2020-12-29T0914+0100
|
||||
|
@ -949,14 +972,24 @@ class MCI_Footnotes_Settings {
|
|||
/**
|
||||
* Settings container key to enable hard links.
|
||||
*
|
||||
* - Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro issue report, thanks to @martinneumannat issue report and code contribution.
|
||||
*
|
||||
* @contributor @martinneumannat
|
||||
* @link https://wordpress.org/support/topic/making-it-amp-compatible/
|
||||
*
|
||||
* @reporter @psykonevro
|
||||
* @link https://wordpress.org/support/topic/footnotes-is-not-amp-compatible/
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @date 2020-12-29T0914+0100
|
||||
* @var str
|
||||
*
|
||||
* When the alternative reference container is enabled, hard links are too.
|
||||
*/
|
||||
const C_STR_FOOTNOTES_HARD_LINKS_ENABLE = 'footnotes_inputfield_hard_links_enable';
|
||||
|
||||
/**
|
||||
* Settings container key for hard link anchors in referrers and footnotes.
|
||||
* Settings container key for the fragment ID slug in referrers.
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @date 2020-12-29T0914+0100
|
||||
|
@ -965,7 +998,7 @@ class MCI_Footnotes_Settings {
|
|||
const C_STR_REFERRER_FRAGMENT_ID_SLUG = 'footnotes_inputfield_referrer_fragment_id_slug';
|
||||
|
||||
/**
|
||||
* Settings container key for hard link anchors in referrers and footnotes.
|
||||
* Settings container key for the fragment ID slug in footnotes.
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @date 2020-12-29T0914+0100
|
||||
|
@ -974,7 +1007,7 @@ class MCI_Footnotes_Settings {
|
|||
const C_STR_FOOTNOTE_FRAGMENT_ID_SLUG = 'footnotes_inputfield_footnote_fragment_id_slug';
|
||||
|
||||
/**
|
||||
* Settings container key for hard link anchors in referrers and footnotes.
|
||||
* Settings container key for the ID separator in fragment IDs.
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @date 2020-12-29T0914+0100
|
||||
|
@ -983,7 +1016,7 @@ class MCI_Footnotes_Settings {
|
|||
const C_STR_HARD_LINK_IDS_SEPARATOR = 'footnotes_inputfield_hard_link_ids_separator';
|
||||
|
||||
/**
|
||||
* Settings container key for shortcode syntax validation.
|
||||
* Settings container key to enable shortcode syntax validation.
|
||||
*
|
||||
* @since 2.4.0
|
||||
* @date 2021-01-01T0616+0100
|
||||
|
@ -1155,18 +1188,18 @@ class MCI_Footnotes_Settings {
|
|||
* @link https://wordpress.org/support/topic/compatibility-issue-with-wpforms/#post-14212318
|
||||
*/
|
||||
const C_STR_FOOTNOTES_LABEL_ISSUE_SOLUTION = 'footnotes_inputfield_label_issue_solution';
|
||||
|
||||
|
||||
/**
|
||||
* Settings container key to enable CSS smooth scrolling.
|
||||
*
|
||||
*
|
||||
* - Update: Scrolling: CSS-based smooth scroll behavior (optional), thanks to @paulgpetty and @bogosavljev issue reports.
|
||||
*
|
||||
*
|
||||
* @reporter @paulgpetty
|
||||
* @link https://wordpress.org/support/topic/functionally-great/#post-13607795
|
||||
*
|
||||
*
|
||||
* @reporter @bogosavljev
|
||||
* @link https://wordpress.org/support/topic/compatibility-issue-with-wpforms/#post-14214720
|
||||
*
|
||||
*
|
||||
* @since 2.5.12
|
||||
* Native smooth scrolling only works in recent browsers.
|
||||
*/
|
||||
|
@ -1305,7 +1338,7 @@ class MCI_Footnotes_Settings {
|
|||
self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no',
|
||||
self::C_STR_FOOTNOTES_STYLING_BEFORE => '[',
|
||||
self::C_STR_FOOTNOTES_STYLING_AFTER => ']',
|
||||
|
||||
|
||||
// Referrers in labels.
|
||||
self::C_STR_FOOTNOTES_LABEL_ISSUE_SOLUTION => 'none',
|
||||
|
||||
|
|
389
class/task.php
389
class/task.php
|
@ -89,15 +89,14 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Searches and replaces the footnotes.
|
||||
* Generates the reference container.
|
||||
* Searches and replaces the footnotes and generates the reference container.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*/
|
||||
class MCI_Footnotes_Task {
|
||||
|
||||
/**
|
||||
* Contains all footnotes found on current public page.
|
||||
* Contains all footnotes found in the searched content.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @var array
|
||||
|
@ -125,14 +124,14 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Infinite scroll: debug autoload by adding post ID, thanks to @docteurfitness issue report and code contribution
|
||||
*
|
||||
* @since 2.0.6
|
||||
* @var int
|
||||
* @reporter @docteurfitness
|
||||
* @link https://wordpress.org/support/topic/auto-load-post-compatibility-update/
|
||||
*
|
||||
* @contributor @docteurfitness
|
||||
* @link https://wordpress.org/support/topic/auto-load-post-compatibility-update/#post-13618833
|
||||
*
|
||||
* @reporter @docteurfitness
|
||||
* @link https://wordpress.org/support/topic/auto-load-post-compatibility-update/
|
||||
* @since 2.0.6
|
||||
* @var int
|
||||
*
|
||||
* As multiple posts are appended to each other, functions and fragment IDs must be disambiguated.
|
||||
* post ID to make everything unique wrt infinite scroll and archive view.
|
||||
|
@ -144,14 +143,13 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Reference container, widget_text hook: support for multiple containers in a page, thanks to @justbecuz bug report.
|
||||
*
|
||||
* @since 2.2.9
|
||||
* @date 2020-12-25T0338+0100
|
||||
*
|
||||
* @reporter @justbecuz
|
||||
* @link https://wordpress.org/support/topic/reset-footnotes-to-1/
|
||||
* @link https://wordpress.org/support/topic/reset-footnotes-to-1/#post-13662830
|
||||
*
|
||||
* @var int 1; incremented every time after a reference container is inserted
|
||||
* @since 2.2.9
|
||||
* @date 2020-12-25T0338+0100
|
||||
* @var int Incremented every time after a reference container is inserted.
|
||||
*
|
||||
* This ID disambiguates multiple reference containers in a page
|
||||
* as they may occur when the widget_text hook is active and the page
|
||||
|
@ -160,41 +158,28 @@ class MCI_Footnotes_Task {
|
|||
public static $a_int_reference_container_id = 1;
|
||||
|
||||
/**
|
||||
* Hard links for AMP compatibility
|
||||
* Hard links for AMP compatibility.
|
||||
*
|
||||
* @since 2.0.0 Bugfix: footnote links script independent.
|
||||
*
|
||||
*
|
||||
* - Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report.
|
||||
*
|
||||
* @since 2.0.4
|
||||
*
|
||||
* @reporter @theroninjedi47
|
||||
* @link https://wordpress.org/support/topic/hyperlinked-footnotes-creating-excessive-back-history/
|
||||
*
|
||||
* @since 2.0.4
|
||||
*
|
||||
* - Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro issue report, thanks to @martinneumannat issue report and code contribution.
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @var bool|str|int
|
||||
*
|
||||
* @contributor @martinneumannat
|
||||
* @link https://wordpress.org/support/topic/making-it-amp-compatible/
|
||||
*
|
||||
* @reporter @psykonevro
|
||||
* @link https://wordpress.org/support/topic/footnotes-is-not-amp-compatible/
|
||||
*
|
||||
* The official AMP plugin strips off JavaScript, breaking Footnotes’
|
||||
* animated scrolling.
|
||||
* When the alternative reference container is enabled, hard links are too.
|
||||
*
|
||||
* Used both in search() and reference_container(), these need to be class variables.
|
||||
*/
|
||||
/**
|
||||
* Whether hard links are enabled.
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @var bool
|
||||
* A property because used both in search() and reference_container().
|
||||
*/
|
||||
public static $a_bool_hard_links_enabled = false;
|
||||
|
||||
|
@ -223,7 +208,7 @@ class MCI_Footnotes_Task {
|
|||
private static $a_str_link_ids_separator = '+';
|
||||
|
||||
/**
|
||||
* Contains the concatenated link.
|
||||
* Contains the concatenated fragment ID base.
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @var str
|
||||
|
@ -238,16 +223,14 @@ class MCI_Footnotes_Task {
|
|||
* @since 2.1.4
|
||||
* @date 2020-12-05T0538+0100
|
||||
*
|
||||
*
|
||||
* - Bugfix: Scroll offset: initialize to safer one third window height for more robustness, thanks to @lukashuggenberg bug report.
|
||||
*
|
||||
* @since 2.4.0
|
||||
* @date 2021-01-03T2055+0100
|
||||
* @date 2021-01-04T0504+0100
|
||||
*
|
||||
* @reporter @lukashuggenberg
|
||||
* @link https://wordpress.org/support/topic/2-2-6-breaks-all-footnotes/#post-13857922
|
||||
*
|
||||
* @since 2.4.0
|
||||
* @date 2021-01-03T2055+0100
|
||||
* @date 2021-01-04T0504+0100
|
||||
* @var int
|
||||
*
|
||||
* Websites may use high fixed headers not contracting at scroll.
|
||||
|
@ -263,27 +246,27 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues, thanks to @docteurfitness issue report and code contribution.
|
||||
*
|
||||
* @since 2.1.4
|
||||
* @date 2020-11-25T1306+0100
|
||||
* @date 2020-11-26T1051+0100
|
||||
* @reporter @docteurfitness
|
||||
* @link https://wordpress.org/support/topic/update-2-1-3/
|
||||
*
|
||||
* @contributor @docteurfitness
|
||||
* @link https://wordpress.org/support/topic/update-2-1-3/#post-13704194
|
||||
*
|
||||
* @reporter @docteurfitness
|
||||
* @link https://wordpress.org/support/topic/update-2-1-3/
|
||||
* @since 2.1.4
|
||||
* @date 2020-11-25T1306+0100
|
||||
* @date 2020-11-26T1051+0100
|
||||
*
|
||||
* - Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro issue report, thanks to @martinneumannat issue report and code contribution.
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @date 2020-12-30T2313+0100
|
||||
*
|
||||
* @contributor @martinneumannat
|
||||
* @link https://wordpress.org/support/topic/making-it-amp-compatible/
|
||||
*
|
||||
* @reporter @psykonevro
|
||||
* @link https://wordpress.org/support/topic/footnotes-is-not-amp-compatible/
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @date 2020-12-30T2313+0100
|
||||
*
|
||||
* Although widely used for that purpose, hyperlinks are disliked for footnote linking.
|
||||
* Browsers may need to be prevented from logging these clicks in the browsing history,
|
||||
* as logging compromises the usability of the 'return to previous' button in browsers.
|
||||
|
@ -300,8 +283,7 @@ class MCI_Footnotes_Task {
|
|||
* the very presence of these link elements may need to be avoided.
|
||||
*
|
||||
* @see self::$a_bool_hard_links_enabled
|
||||
*
|
||||
* Used both in search() and reference_container(), these need to be class variables.
|
||||
* A property because used both in search() and reference_container().
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -333,12 +315,12 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Update: Tooltips: ability to display dedicated content before `[[/tooltip]]`, thanks to @jbj2199 issue report.
|
||||
*
|
||||
* @since 2.5.2
|
||||
* @date 2021-01-19T2223+0100
|
||||
*
|
||||
* @reporter @jbj2199
|
||||
* @link https://wordpress.org/support/topic/change-tooltip-text/
|
||||
*
|
||||
* @since 2.5.2
|
||||
* @date 2021-01-19T2223+0100
|
||||
*
|
||||
* Tooltips can display another content than the footnote entry
|
||||
* in the reference container. The trigger is a shortcode in
|
||||
* the footnote text separating the tooltip text from the note.
|
||||
|
@ -409,55 +391,6 @@ class MCI_Footnotes_Task {
|
|||
*/
|
||||
public function register_hooks() {
|
||||
|
||||
/**
|
||||
* Priority levels.
|
||||
*
|
||||
* - Bugfix: Reference container: fix relative position through priority level, thanks to @june01 @imeson @spaceling bug reports, thanks to @spaceling code contribution.
|
||||
*
|
||||
* @since 2.0.5
|
||||
* @date 2020-11-02T0330+0100
|
||||
* @link https://codex.wordpress.org/Plugin_API/#Hook_in_your_Filter
|
||||
*
|
||||
* @contributor @spaceling
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/#post-13608594
|
||||
*
|
||||
* @reporter @june01
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/
|
||||
*
|
||||
* @reporter @imeson
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/#post-13538345
|
||||
*
|
||||
*
|
||||
* - Bugfix: Dashboard: priority level setting for the_content hook, thanks to @imeson bug report.
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @date 2020-11-17T0254+0100
|
||||
*
|
||||
* @reporter @imeson
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/#post-13538345
|
||||
*
|
||||
*
|
||||
* - Bugfix: Dashboard: priority level settings for all other hooks, thanks to @nikelaos bug report.
|
||||
*
|
||||
* @since 2.1.2
|
||||
* @date 2020-11-19T1849+0100
|
||||
*
|
||||
* @reporter @nikelaos
|
||||
* @link https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13676705
|
||||
*
|
||||
*
|
||||
* 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
|
||||
* features added by other plugins, e.g. related post lists and social buttons.
|
||||
*
|
||||
* For YARPP to display related posts below the Footnotes reference container,
|
||||
* priority needs to be at least 1200 (i.e. 0 =< $l_int_the_content_priority =< 1200).
|
||||
*
|
||||
* PHP_INT_MAX cannot be reset by leaving the number box empty. because browsers
|
||||
* (WebKit) don’t allow it, so we must resort to -1.
|
||||
* @link https://github.com/Modernizr/Modernizr/issues/171
|
||||
*/
|
||||
|
||||
// Get values from settings.
|
||||
$l_int_the_title_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL ) );
|
||||
$l_int_the_content_priority = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL ) );
|
||||
|
@ -491,14 +424,14 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution.
|
||||
*
|
||||
* @since 2.5.0
|
||||
* @date 2021-01-05T1402+0100
|
||||
* @reporter @vitaefit
|
||||
* @link https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/
|
||||
*
|
||||
* @contributor @misfist
|
||||
* @link https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/#post-13864859
|
||||
*
|
||||
* @reporter @vitaefit
|
||||
* @link https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/
|
||||
* @since 2.5.0
|
||||
* @date 2021-01-05T1402+0100
|
||||
*
|
||||
* Category pages can have rich HTML content in a term description with article status.
|
||||
* For this to happen, WordPress’ built-in partial HTML blocker needs to be disabled.
|
||||
|
@ -511,11 +444,11 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report.
|
||||
*
|
||||
* @since 2.5.1
|
||||
* @date 2021-01-18T2038+0100
|
||||
*
|
||||
* @reporter @squatcher
|
||||
* @link https://wordpress.org/support/topic/footnotes-use-in-popup-maker/
|
||||
*
|
||||
* @since 2.5.1
|
||||
* @date 2021-01-18T2038+0100
|
||||
*/
|
||||
add_filter( 'pum_popup_content', array( $this, 'the_content' ), $l_int_the_content_priority );
|
||||
}
|
||||
|
@ -548,13 +481,6 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - BUGFIX: Hooks: Default-disable 'the_post', thanks to @spaceling @markcheret @nyamachi @whichgodsaves @spiralofhope2 @mmallett @andreasra @widecast @ymorin007 @tashi1es bug reports.
|
||||
*
|
||||
* @since 2.0.7
|
||||
* @accountable @pewgeuges
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13630114
|
||||
* @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13630303
|
||||
* @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13630799
|
||||
* @link https://wordpress.org/support/topic/no-footnotes-anymore/#post-13813233
|
||||
*
|
||||
* @reporter @spaceling
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/#post-13612697
|
||||
*
|
||||
|
@ -588,6 +514,11 @@ class MCI_Footnotes_Task {
|
|||
* @reporter @tashi1es
|
||||
* @link https://wordpress.org/support/topic/footnotes-appear-in-random-places-on-academic-website/#post-13630495
|
||||
*
|
||||
* @since 2.0.7
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13630114
|
||||
* @link https://wordpress.org/support/topic/footnotes-appearing-in-header/#post-13630303
|
||||
* @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13630799
|
||||
* @link https://wordpress.org/support/topic/no-footnotes-anymore/#post-13813233
|
||||
*
|
||||
* - UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook.
|
||||
*
|
||||
|
@ -620,18 +551,18 @@ class MCI_Footnotes_Task {
|
|||
|
||||
// Insert start tag without switching out of PHP.
|
||||
echo "\r\n<style type=\"text/css\" media=\"all\">\r\n";
|
||||
|
||||
|
||||
/**
|
||||
* Enables CSS smooth scrolling.
|
||||
*
|
||||
*
|
||||
* - Update: Scrolling: CSS-based smooth scroll behavior (optional), thanks to @paulgpetty and @bogosavljev issue reports.
|
||||
*
|
||||
*
|
||||
* @reporter @paulgpetty
|
||||
* @link https://wordpress.org/support/topic/functionally-great/#post-13607795
|
||||
*
|
||||
*
|
||||
* @reporter @bogosavljev
|
||||
* @link https://wordpress.org/support/topic/compatibility-issue-with-wpforms/#post-14214720
|
||||
*
|
||||
*
|
||||
* @since 2.5.12
|
||||
* Native smooth scrolling only works in recent browsers.
|
||||
*/
|
||||
|
@ -644,12 +575,12 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Referrers: optional fixes to vertical alignment, font size and position (static) for in-theme consistency and cross-theme stability, thanks to @tomturowski bug report.
|
||||
*
|
||||
* @since 2.5.4
|
||||
* @date 2021-02-12T1631+0100
|
||||
*
|
||||
* @reporter @tomturowski
|
||||
* @link https://wordpress.org/support/topic/in-line-superscript-ref-rides-to-high/
|
||||
*
|
||||
* @since 2.5.4
|
||||
* @date 2021-02-12T1631+0100
|
||||
*
|
||||
* Cannot be included in external stylesheet, as it is only optional.
|
||||
* The scope is variable too: referrers only, or all superscript elements.
|
||||
*/
|
||||
|
@ -668,10 +599,10 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report.
|
||||
*
|
||||
* @since 2.1.1
|
||||
*
|
||||
* @reporter @dragon013
|
||||
* @link https://wordpress.org/support/topic/possible-to-hide-it-from-start-page/
|
||||
*
|
||||
* @since 2.1.1
|
||||
*/
|
||||
if ( ! MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE ) ) ) {
|
||||
|
||||
|
@ -683,10 +614,10 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report.
|
||||
*
|
||||
* @since 2.3.0
|
||||
*
|
||||
* @reporter @hamshe
|
||||
* @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13786635
|
||||
*
|
||||
* @since 2.3.0
|
||||
*/
|
||||
$l_int_reference_container_top_margin = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_TOP_MARGIN ) );
|
||||
$l_int_reference_container_bottom_margin = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN ) );
|
||||
|
@ -702,11 +633,11 @@ class MCI_Footnotes_Task {
|
|||
* - Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report.
|
||||
* - Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report.
|
||||
*
|
||||
* @since 2.2.5
|
||||
* @date 2020-12-18T1447+0100
|
||||
*
|
||||
* @reporter @markhillyer
|
||||
* @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/
|
||||
*
|
||||
* @since 2.2.5
|
||||
* @date 2020-12-18T1447+0100
|
||||
*/
|
||||
if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER ) ) ) {
|
||||
echo '.footnote_container_prepare > ';
|
||||
|
@ -719,13 +650,16 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Reference container: add option for table borders to restore pre-2.0.0 design, thanks to @noobishh issue report.
|
||||
*
|
||||
* @since 2.2.10
|
||||
* @date 2020-12-25T2304+0100
|
||||
*
|
||||
* @reporter @noobishh
|
||||
* @link https://wordpress.org/support/topic/borders-25/
|
||||
*
|
||||
* @todo Use `wp_add_inline_style()` or something like that instead.
|
||||
* @since 2.2.10
|
||||
* @date 2020-12-25T2304+0100
|
||||
* Moving this internal CSS to external using `wp_add_inline_style()` is
|
||||
* discouraged, because that screws up support, and it is pointless from
|
||||
* a performance point of view. Moreover, that would cause cache busting
|
||||
* issues as browsers won’t reload these style sheets after settings are
|
||||
* changed while the version string is not.
|
||||
*/
|
||||
if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE ) ) ) {
|
||||
echo '.footnotes_table, .footnotes_plugin_reference_row {';
|
||||
|
@ -1023,11 +957,10 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback.
|
||||
*
|
||||
* @since 2.1.1
|
||||
*
|
||||
* @reporter @andreasra
|
||||
* @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566
|
||||
*
|
||||
* @since 2.1.1
|
||||
* The script for alternative tooltips is printed formatted, not minified,
|
||||
* for transparency. It isn’t indented though (the PHP open tag neither).
|
||||
*/
|
||||
|
@ -1045,7 +978,8 @@ class MCI_Footnotes_Task {
|
|||
document.getElementById(footnote_tooltip_id).classList.add('hidden');
|
||||
}
|
||||
</script>
|
||||
<?php
|
||||
<?php // Indenting this PHP open tag would mess up the page source.
|
||||
// End internal script.
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -1053,8 +987,8 @@ class MCI_Footnotes_Task {
|
|||
* Displays the 'LOVE FOOTNOTES' slug if enabled.
|
||||
*
|
||||
* @since 1.5.0
|
||||
*
|
||||
* @since 2.2.0 more options 2020-12-11T0506+0100
|
||||
* @since 2.2.0 More options.
|
||||
* @date 2020-12-11T0506+0100
|
||||
*/
|
||||
public function wp_footer() {
|
||||
if ( 'footer' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) {
|
||||
|
@ -1133,11 +1067,10 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Process: fix footnote duplication by emptying the footnotes list every time the search algorithm is run on the content, thanks to @inoruhana bug report.
|
||||
*
|
||||
* @since 2.5.7
|
||||
*
|
||||
* @reporter @inoruhana
|
||||
* @link https://wordpress.org/support/topic/footnote-duplicated-in-the-widget/
|
||||
*
|
||||
* @since 2.5.7
|
||||
* Under certain circumstances, footnotes were duplicated, because the footnotes list was
|
||||
* not emptied every time before the search algorithm was run. That happened eg when both
|
||||
* the reference container resides in the widget area, and the YOAST SEO plugin is active
|
||||
|
@ -1232,35 +1165,34 @@ class MCI_Footnotes_Task {
|
|||
* @param bool $p_bool_output_references Appends the Reference Container to the output if set to true, default true.
|
||||
* @param bool $p_bool_hide_footnotes_text Hide footnotes found in the string.
|
||||
* @return string
|
||||
*
|
||||
* @since 2.2.0 Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report.
|
||||
* @since 2.2.5 Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report.
|
||||
*/
|
||||
public function exec( $p_str_content, $p_bool_output_references = false, $p_bool_hide_footnotes_text = false ) {
|
||||
|
||||
// Replace all footnotes in the content, settings are converted to html characters.
|
||||
$p_str_content = $this->search( $p_str_content, true, $p_bool_hide_footnotes_text );
|
||||
// Replace all footnotes in the content, settings are NOT converted to html characters.
|
||||
$p_str_content = $this->search( $p_str_content, false, $p_bool_hide_footnotes_text );
|
||||
// Process content, escape HTML special characters in delimiter shortcodes.
|
||||
$p_str_content = $this->search( $p_str_content, true, true, $p_bool_hide_footnotes_text );
|
||||
// Process content, escape HTML special characters except greater-than sign in delimiter shortcodes.
|
||||
$p_str_content = $this->search( $p_str_content, true, false, $p_bool_hide_footnotes_text );
|
||||
// Process content, not escape any HTML special characters in delimiter shortcodes.
|
||||
$p_str_content = $this->search( $p_str_content, false, true, $p_bool_hide_footnotes_text );
|
||||
|
||||
/**
|
||||
* Reference container customized positioning through shortcode.
|
||||
*
|
||||
* - Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report.
|
||||
*
|
||||
* @since 2.2.0
|
||||
* @date 2020-12-13T2057+0100
|
||||
*
|
||||
* @reporter @hamshe
|
||||
* @link https://wordpress.org/support/topic/reference-container-in-elementor/
|
||||
*
|
||||
* - Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report.
|
||||
* @since 2.2.0
|
||||
* @date 2020-12-13T2057+0100
|
||||
*
|
||||
* @since 2.2.5
|
||||
* @date 2020-12-18T1434+0100
|
||||
* - Bugfix: Reference container: delete position shortcode if unused because position may be widget or footer, thanks to @hamshe bug report.
|
||||
*
|
||||
* @reporter @hamshe
|
||||
* @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13784126
|
||||
*
|
||||
* @since 2.2.5
|
||||
* @date 2020-12-18T1434+0100
|
||||
*/
|
||||
// Append the reference container or insert at shortcode.
|
||||
$l_str_reference_container_position_shortcode = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE );
|
||||
|
@ -1300,8 +1232,8 @@ class MCI_Footnotes_Task {
|
|||
* Replaces all footnotes in the given content and appends them to the static property.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @param string $p_str_content Content to be searched for footnotes.
|
||||
* @param bool $p_bool_convert_html_chars html encode settings, default true.
|
||||
* @param string $p_str_content Any content to be searched for footnotes.
|
||||
* @param bool $p_bool_convert_html_chars HTML escape delimiter shortcodes.
|
||||
* @param bool $p_bool_hide_footnotes_text Hide footnotes found in the string.
|
||||
* @return string
|
||||
*
|
||||
|
@ -1310,8 +1242,16 @@ class MCI_Footnotes_Task {
|
|||
* @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report.
|
||||
* @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report.
|
||||
* @since 2.5.0 Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report.
|
||||
*
|
||||
* - Bugfix: Footnote delimiter short codes: debug closing pointy brackets in the Block Editor by accounting for unbalanced HTML escapement.
|
||||
*
|
||||
* @since 2.5.13
|
||||
* @param bool $p_bool_balanced_html_escapement Use the Classic Editor visual mode escapement schema.
|
||||
* While the Classic Editor (visual mode) escapes both pointy brackets,
|
||||
* the Block Editor enforces balanced escapement only in text mode. In
|
||||
* visual mode, the Block Editor does not escape the greater-than sign.
|
||||
*/
|
||||
public function search( $p_str_content, $p_bool_convert_html_chars, $p_bool_hide_footnotes_text ) {
|
||||
public function search( $p_str_content, $p_bool_convert_html_chars, $p_bool_balanced_html_escapement, $p_bool_hide_footnotes_text ) {
|
||||
|
||||
// Post ID to make everything unique wrt infinite scroll and archive view.
|
||||
self::$a_int_post_id = get_the_id();
|
||||
|
@ -1329,10 +1269,20 @@ class MCI_Footnotes_Task {
|
|||
$l_str_starting_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED );
|
||||
$l_str_ending_tag = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED );
|
||||
}
|
||||
// Decode html special chars.
|
||||
|
||||
// Escape HTML special chars.
|
||||
if ( $p_bool_convert_html_chars ) {
|
||||
$l_str_starting_tag = htmlspecialchars( $l_str_starting_tag );
|
||||
$l_str_ending_tag = htmlspecialchars( $l_str_ending_tag );
|
||||
|
||||
if ( $p_bool_balanced_html_escapement ) {
|
||||
// The post has been written in the Classic Editor visual mode.
|
||||
$l_str_starting_tag = htmlspecialchars( $l_str_starting_tag );
|
||||
$l_str_ending_tag = htmlspecialchars( $l_str_ending_tag );
|
||||
|
||||
} else {
|
||||
// The post has been written in the Block Editor visual mode.
|
||||
$l_str_starting_tag = str_replace( '>', '>', htmlspecialchars( $l_str_starting_tag ) );
|
||||
$l_str_ending_tag = str_replace( '>', '>', htmlspecialchars( $l_str_ending_tag ) );
|
||||
}
|
||||
}
|
||||
|
||||
// If footnotes short code is empty, return the content without changes.
|
||||
|
@ -1351,15 +1301,13 @@ class MCI_Footnotes_Task {
|
|||
* - Bugfix: Footnote delimiters: Syntax validation: complete message with hint about setting, thanks to @andreasra bug report.
|
||||
* - Bugfix: Footnote delimiters: Syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report.
|
||||
*
|
||||
* @since 2.5.0
|
||||
* @date 2021-01-07T0824+0100
|
||||
*
|
||||
* @reporter @andreasra
|
||||
* @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/
|
||||
*
|
||||
* @since 2.5.0
|
||||
* @date 2021-01-07T0824+0100
|
||||
* If footnotes short codes are unbalanced, and syntax validation is not disabled,
|
||||
* prepend a warning to the content; displays de facto beneath the post title.
|
||||
*
|
||||
* The delimiter shortcode regex forms are also used later below.
|
||||
*/
|
||||
// Make shortcodes conform to regex syntax.
|
||||
|
@ -1427,11 +1375,10 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Forms: remove footnotes from input field values, thanks to @bogosavljev bug report.
|
||||
*
|
||||
* @since 2.5.11
|
||||
*
|
||||
* @reporter @bogosavljev
|
||||
* @link https://wordpress.org/support/topic/compatibility-issue-with-wpforms/
|
||||
*
|
||||
* @since 2.5.11
|
||||
* When the HTML 'input' element 'value' attribute value
|
||||
* is derived from 'label', footnotes need to be removed
|
||||
* in the value of 'value'.
|
||||
|
@ -1467,6 +1414,7 @@ class MCI_Footnotes_Task {
|
|||
* - Bugfix: Forms: prevent inadvertently toggling input elements with footnotes in their label, by optionally disconnecting those labels.
|
||||
*
|
||||
* @since 2.5.12
|
||||
* This option is discouraged because of accessibility issues.
|
||||
* This only edits those labels’ 'for' value that have footnotes,
|
||||
* but leaves all other labels (those without footnotes) alone.
|
||||
* @link https://wordpress.org/support/topic/compatibility-issue-with-wpforms/#post-14212318
|
||||
|
@ -1576,20 +1524,18 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Tooltips: fix line breaking for hyperlinked URLs in Unicode-non-compliant user agents, thanks to @andreasra bug report.
|
||||
*
|
||||
* @since 2.1.1
|
||||
*
|
||||
* @reporter @andreasra
|
||||
* @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/3/#post-13657398
|
||||
*
|
||||
* @since 2.1.1
|
||||
*
|
||||
* - Bugfix: Reference container: fix width in mobile view by URL wrapping for Unicode-non-conformant browsers, thanks to @karolszakiel bug report.
|
||||
*
|
||||
* @since 2.1.3
|
||||
* @date 2020-11-23
|
||||
*
|
||||
* @reporter @karolszakiel
|
||||
* @link https://wordpress.org/support/topic/footnotes-on-mobile-phones/
|
||||
*
|
||||
* @since 2.1.3
|
||||
* @date 2020-11-23
|
||||
*
|
||||
* - Bugfix: Reference container, tooltips: fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element.
|
||||
*
|
||||
|
@ -1597,23 +1543,21 @@ class MCI_Footnotes_Task {
|
|||
* @date 2020-11-25T0837+0100
|
||||
* @link https://wordpress.org/support/topic/footnotes-on-mobile-phones/#post-13710682
|
||||
*
|
||||
*
|
||||
* - Bugfix: Reference container, tooltips: URL wrap: exclude image source too, thanks to @bjrnet21 bug report.
|
||||
*
|
||||
* @since 2.1.5
|
||||
*
|
||||
* @reporter @bjrnet21
|
||||
* @link https://wordpress.org/support/topic/2-1-4-breaks-on-my-site-images-dont-show/
|
||||
*
|
||||
* @since 2.1.5
|
||||
*
|
||||
* - Bugfix: Reference container, tooltips: URL wrap: fix regex, thanks to @a223123131 bug report.
|
||||
*
|
||||
* @since 2.1.6
|
||||
* @date 2020-12-09T1921+0100
|
||||
*
|
||||
* @reporter @a223123131
|
||||
* @link https://wordpress.org/support/topic/broken-layout-starting-version-2-1-4/
|
||||
*
|
||||
* @since 2.1.6
|
||||
* @date 2020-12-09T1921+0100
|
||||
*
|
||||
* Even ARIA labels may take a URL as value, so use \w=[\'"] as a catch-all 2020-12-10T1005+0100
|
||||
*
|
||||
* - Bugfix: Dashboard: URL wrap: add option to properly enable/disable URL wrap.
|
||||
|
@ -1621,21 +1565,16 @@ class MCI_Footnotes_Task {
|
|||
* @since 2.1.6
|
||||
* @date 2020-12-09T1606+0100
|
||||
*
|
||||
*
|
||||
* - Bugfix: Reference container, tooltips: URL wrap: make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report.
|
||||
*
|
||||
* @since 2.2.6
|
||||
* @date 2020-12-23T0409+0100
|
||||
*
|
||||
* @reporter @spiralofhope2
|
||||
* @link https://wordpress.org/support/topic/two-links-now-breaks-footnotes-with-blogtext/
|
||||
*
|
||||
* @since 2.2.6
|
||||
* @date 2020-12-23T0409+0100
|
||||
*
|
||||
* - Bugfix: Reference container, tooltips: URL wrap: remove a bug introduced in the regex, thanks to @rjl20 @spaceling @lukashuggenberg @klusik @friedrichnorth @bernardzit bug reports.
|
||||
*
|
||||
* @since 2.2.7
|
||||
* @date 2020-12-23T1046+0100
|
||||
*
|
||||
* @reporter @rjl20
|
||||
* @link https://wordpress.org/support/topic/two-links-now-breaks-footnotes-with-blogtext/#post-13825479
|
||||
*
|
||||
|
@ -1654,45 +1593,50 @@ class MCI_Footnotes_Task {
|
|||
* @reporter @bernardzit
|
||||
* @link https://wordpress.org/support/topic/footnotes-dont-show-after-update-to-2-2-6/#post-13826029
|
||||
*
|
||||
* @since 2.2.8 Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report.
|
||||
* @date 2020-12-23T1107+0100
|
||||
* @since 2.2.7
|
||||
* @date 2020-12-23T1046+0100
|
||||
*
|
||||
* - Bugfix: Reference container, tooltips: URL wrap: correctly make the quotation mark optional wrt query parameters, thanks to @spiralofhope2 bug report.
|
||||
*
|
||||
* @reporter @spiralofhope2
|
||||
* @link https://wordpress.org/support/topic/two-links-now-breaks-footnotes-with-blogtext/
|
||||
*
|
||||
* @since 2.2.8
|
||||
* @date 2020-12-23T1107+0100
|
||||
* Correct is duplicating the negative lookbehind w/o quotes: '(?<!\w=)'
|
||||
*
|
||||
* @since 2.2.9 Bugfix: Reference container, tooltips: URL wrap: account for RFC 2396 allowed characters in parameter names.
|
||||
* - Bugfix: Reference container, tooltips: URL wrap: account for RFC 2396 allowed characters in parameter names.
|
||||
* - Bugfix: Reference container, tooltips: URL wrap: exclude URLs also where the equals sign is preceded by an entity or character reference.
|
||||
*
|
||||
* @since 2.2.9
|
||||
* @date 2020-12-24T1956+0100
|
||||
* @link https://stackoverflow.com/questions/814700/http-url-allowed-characters-in-parameter-names
|
||||
*
|
||||
* @since 2.2.9 Bugfix: Reference container, tooltips: URL wrap: exclude URLs also where the equals sign is preceded by an entity or character reference.
|
||||
* @date 2020-12-25T1251+0100
|
||||
*
|
||||
* @since 2.2.10 Bugfix: Reference container, tooltips: URL wrap: support also file transfer protocol URLs.
|
||||
* - Bugfix: Reference container, tooltips: URL wrap: support also file transfer protocol URLs.
|
||||
*
|
||||
* @since 2.2.10
|
||||
* @date 2020-12-25T2220+0100
|
||||
*
|
||||
*
|
||||
* - Bugfix: Reference container, tooltips: URL wrap: exclude URL pattern as folder name in Wayback Machine URL, thanks to @rumperuu bug report.
|
||||
*
|
||||
* @since 2.5.3
|
||||
* @date 2021-01-24
|
||||
*
|
||||
* @reporter @rumperuu
|
||||
* @link https://wordpress.org/support/topic/line-wrap-href-regex-bug/
|
||||
*
|
||||
* @since 2.5.3
|
||||
* @date 2021-01-24
|
||||
* By adding a 3rd negative lookbehind: '(?<!/)'.
|
||||
*
|
||||
*
|
||||
* - Bugfix: Reference container, tooltips: URL wrap: account for leading space in value, thanks to @karolszakiel example provision.
|
||||
*
|
||||
* @since 2.5.4
|
||||
*
|
||||
* @reporter @karolszakiel
|
||||
* @link https://wordpress.org/support/topic/footnotes-on-mobile-phones/
|
||||
*
|
||||
* @since 2.5.4
|
||||
* The value of an href argument may have leading (and trailing) space.
|
||||
* @link https://webmasters.stackexchange.com/questions/93540/are-spaces-in-href-valid
|
||||
* Needs to replicate the relevant negative lookbehind at least with one and with two spaces.
|
||||
* Note: The WordPress blog engine edits these values, cropping these leading/trailing spaces.
|
||||
* But given they can occur on WP-powered websites, some page builders may probably not.
|
||||
*/
|
||||
if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_URL_WRAP_ENABLED ) ) ) {
|
||||
|
||||
|
@ -1739,12 +1683,11 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @date 2020-11-08T2146+0100
|
||||
*
|
||||
* @reporter @rovanov
|
||||
* @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @date 2020-11-08T2146+0100
|
||||
* If the tooltip truncation option is enabled, it’s done based on character count,
|
||||
* and a trailing incomplete word is cropped.
|
||||
* This is equivalent to the WordPress default excerpt generation, i.e. without a
|
||||
|
@ -1784,11 +1727,11 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @date 2020-11-08T2146+0100
|
||||
*
|
||||
* @reporter @rovanov
|
||||
* @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @date 2020-11-08T2146+0100
|
||||
*/
|
||||
$l_str_excerpt_text .= MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL );
|
||||
|
||||
|
@ -1799,14 +1742,13 @@ class MCI_Footnotes_Task {
|
|||
/**
|
||||
* Referrers element superscript or baseline.
|
||||
*
|
||||
* Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report
|
||||
*
|
||||
* @since 2.1.1
|
||||
* - Bugfix: Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report.
|
||||
*
|
||||
* @reporter @cwbayer
|
||||
* @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/
|
||||
*
|
||||
* define the HTML element to use for the referrers.
|
||||
* @since 2.1.1
|
||||
* Define the HTML element to use for the referrers.
|
||||
*/
|
||||
if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS ) ) ) {
|
||||
|
||||
|
@ -1848,12 +1790,11 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Process: initialize hard link address variables to empty string to fix 'undefined variable' bug, thanks to @a223123131 bug report.
|
||||
*
|
||||
* @since 2.4.0
|
||||
* @date 2021-01-04T1622+0100
|
||||
*
|
||||
* @reporter @a223123131
|
||||
* @link https://wordpress.org/support/topic/wp_debug-php-notice/
|
||||
*
|
||||
* @since 2.4.0
|
||||
* @date 2021-01-04T1622+0100
|
||||
* If no hyperlink nor offset anchor is needed, initialize as empty.
|
||||
*/
|
||||
$l_str_footnote_link_argument = '';
|
||||
|
@ -1970,14 +1911,13 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution.
|
||||
*
|
||||
* @since 2.5.5
|
||||
* @reporter @rumperuu
|
||||
* @link https://wordpress.org/support/topic/footnotes-numbered-incorrectly/
|
||||
*
|
||||
* @contributor @lolzim
|
||||
* @link https://wordpress.org/support/topic/footnotes-numbered-incorrectly/#post-14062032
|
||||
*
|
||||
* @reporter @rumperuu
|
||||
* @link https://wordpress.org/support/topic/footnotes-numbered-incorrectly/
|
||||
*
|
||||
* @since 2.5.5
|
||||
* This assignment was overridden by another one, causing the algorithm to jump back
|
||||
* near the post start to a position calculated as the sum of the length of the last
|
||||
* footnote and the length of the last footnote replace text.
|
||||
|
@ -2019,13 +1959,12 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback.
|
||||
*
|
||||
* @since 2.1.1
|
||||
*
|
||||
* @reporter @spaceling
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13671138
|
||||
*
|
||||
* If the backlink symbol is enabled.
|
||||
* @since 2.1.1
|
||||
*/
|
||||
// If the backlink symbol is enabled.
|
||||
if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE ) ) ) {
|
||||
|
||||
// Get html arrow.
|
||||
|
@ -2057,17 +1996,16 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution.
|
||||
*
|
||||
* @since 2.1.4
|
||||
* @date 2020-11-28T1048+0100
|
||||
* @reporter @docteurfitness
|
||||
* @link https://wordpress.org/support/topic/update-2-1-3/
|
||||
*
|
||||
* @contributor @docteurfitness
|
||||
* @link https://wordpress.org/support/topic/update-2-1-3/#post-13704194
|
||||
*
|
||||
* @reporter @docteurfitness
|
||||
* @link https://wordpress.org/support/topic/update-2-1-3/
|
||||
*
|
||||
* Initially a comma was appended in this algorithm for enumerations.
|
||||
* The comma in enumerations is not generally preferred.
|
||||
* @since 2.1.4
|
||||
* @date 2020-11-28T1048+0100
|
||||
* Initially an appended comma was hard-coded in this algorithm for enumerations.
|
||||
* The comma in enumerations is not universally preferred.
|
||||
*/
|
||||
if ( MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_ENABLED ) ) ) {
|
||||
|
||||
|
@ -2278,11 +2216,10 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report.
|
||||
*
|
||||
* @since 2.5.4
|
||||
*
|
||||
* @reporter @theroninjedi47
|
||||
* @link https://wordpress.org/support/topic/hyperlinked-footnotes-creating-excessive-back-history/
|
||||
*
|
||||
* @since 2.5.4
|
||||
* When hard links are enabled, clicks on the backlinks are logged in the browsing history.
|
||||
* This tooltip hints to use the backbutton instead, so the history gets streamlined again.
|
||||
* @link https://wordpress.org/support/topic/making-it-amp-compatible/#post-13837359
|
||||
|
@ -2326,12 +2263,11 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report.
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @date 2020-11-14T2233+0100
|
||||
*
|
||||
* @reporter @happyches
|
||||
* @link https://wordpress.org/support/topic/custom-css-for-jumbled-references/
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @date 2020-11-14T2233+0100
|
||||
* Prepare to have single footnotes, where the click event and
|
||||
* optional hard link need to be set to cover the table cell,
|
||||
* for better usability and UX.
|
||||
|
@ -2544,11 +2480,10 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* - Bugfix: Reference container: Label: set empty label to U+202F NNBSP for more robustness, thanks to @lukashuggenberg feedback.
|
||||
*
|
||||
* @since 2.4.0
|
||||
* @date 2021-01-04T0504+0100
|
||||
*
|
||||
* @reporter @lukashuggenberg
|
||||
*
|
||||
* @since 2.4.0
|
||||
* @date 2021-01-04T0504+0100
|
||||
* Themes may drop-cap a first letter of initial paragraphs, like this label.
|
||||
* In case of empty label that would apply to the left half button character.
|
||||
* Hence the point in setting an empty label to U+202F NARROW NO-BREAK SPACE.
|
||||
|
|
|
@ -6,8 +6,6 @@
|
|||
* @package footnotes
|
||||
* @since 1.5.0
|
||||
* @date 14.09.14 14:26
|
||||
*
|
||||
* @since 2.2.0 (TBD) 2020-12-12T2131+0100
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -66,7 +64,7 @@ class MCI_Footnotes_Widget_Reference_Container extends MCI_Footnotes_Widget_Base
|
|||
* Outputs the Content of the Widget.
|
||||
*
|
||||
* @since 1.5.0
|
||||
* @param mixed $args The widget's arguments.
|
||||
* @param mixed $args The widget's arguments.
|
||||
* @param mixed $instance The instance of the widget.
|
||||
*/
|
||||
public function widget( $args, $instance ) {
|
||||
|
@ -74,7 +72,7 @@ class MCI_Footnotes_Widget_Reference_Container extends MCI_Footnotes_Widget_Base
|
|||
// Reference container positioning is set to "widget area".
|
||||
if ( 'widget' === MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION ) ) {
|
||||
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
echo $g_obj_mci_footnotes->a_obj_task->Reference_Container();
|
||||
echo $g_obj_mci_footnotes->a_obj_task->reference_container();
|
||||
// phpcs:enable
|
||||
}
|
||||
}
|
||||
|
|
|
@ -372,11 +372,13 @@ table
|
|||
|
||||
caption.accessibility {
|
||||
text-align: start;
|
||||
height: 1px;
|
||||
width: 1px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
color: #ffffff00;
|
||||
margin-top: -2px !important;
|
||||
height: 1px !important;
|
||||
width: 1px !important;
|
||||
white-space: nowrap !important;
|
||||
overflow: hidden !important;
|
||||
color: #ffffff00 !important;
|
||||
background-color: #ffffff00 !important;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -402,6 +404,10 @@ caption.accessibility {
|
|||
* @link https://wordpress.org/support/topic/right-to-left-text-problem/
|
||||
*/
|
||||
|
||||
.footnotes_table .footnotes_plugin_reference_row th {
|
||||
background-color: inherit !important;
|
||||
}
|
||||
|
||||
.footnote_plugin_index,
|
||||
.footnote_plugin_index_combi,
|
||||
.footnote_plugin_symbol,
|
||||
|
|
|
@ -4,29 +4,31 @@
|
|||
* 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
|
||||
* Package V.: 2.5.12
|
||||
* Version: 2.5.12
|
||||
* Package V.: 2.5.13
|
||||
* Version: 2.5.13
|
||||
* CAUTION: THIS V. FIELD IS PARSED FOR UPDATE CONFIGURATION.
|
||||
* Author URI: https://cheret.org/footnotes/
|
||||
* Text Domain: footnotes
|
||||
* Domain Path: /languages
|
||||
*
|
||||
* @package footnotes
|
||||
* @copyright 2021 Mark Cheret (email: mark@cheret.de)
|
||||
*/
|
||||
|
||||
/**
|
||||
* Package Version number for stylesheet cache busting.
|
||||
*
|
||||
* Please keep this constant in sync with the Package Version in the header above
|
||||
* and in the header of the readme, but not necessarily with the other Version.
|
||||
*
|
||||
* Please keep this string in sync with the PACKAGE Version ('Package V.').
|
||||
* Please mirror the 'Version' (NOT 'Package V.') in js/wysiwyg-editor.js.
|
||||
* @since 2.1.4
|
||||
* @since 2.5.3 (Hungarian)
|
||||
* @var str
|
||||
* @lastmodified 2021-03-22T0416+0100
|
||||
* @lastmodified 2021-03-24T2213+0100
|
||||
*/
|
||||
define( 'C_STR_PACKAGE_VERSION', '2.5.12' );
|
||||
define( 'C_STR_PACKAGE_VERSION', '2.5.13' );
|
||||
/**
|
||||
* Enables toggling the stylesheet enqueuing mode from production (true) to development (false).
|
||||
* @see Full docblock below next.
|
||||
*/
|
||||
define( 'C_BOOL_CSS_PRODUCTION_MODE', true );
|
||||
|
||||
/**
|
||||
* Version numbers in WordPress plugin readme.txt and main PHP headers.
|
||||
|
@ -113,6 +115,22 @@ define( 'C_STR_PACKAGE_VERSION', '2.5.12' );
|
|||
* @link https://developer.wordpress.org/plugins/wordpress-org/how-your-readme-txt-works/
|
||||
*/
|
||||
|
||||
/**
|
||||
* Enables toggling the stylesheet enqueuing mode from production (true) to development (false).
|
||||
*
|
||||
* @since 2.5.5
|
||||
* @var bool true: production mode.
|
||||
* false: development mode.
|
||||
* @see class/init.php
|
||||
*
|
||||
* In production, a minified CSS file tailored to the settings is enqueued.
|
||||
*
|
||||
* Developing stylesheets is meant to be easier when this is set to false.
|
||||
* WARNING: This facility designed for development must NOT be used in production.
|
||||
*
|
||||
* @see constant define near version constant above.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Plugin’s main PHP file.
|
||||
*
|
||||
|
@ -132,17 +150,3 @@ add_filter( "plugin_action_links_{$l_str_plugin_file}", array( 'MCI_Footnotes_Ho
|
|||
$g_obj_mci_footnotes = new MCI_Footnotes();
|
||||
// Run the Plugin.
|
||||
$g_obj_mci_footnotes->run();
|
||||
|
||||
/**
|
||||
* Sets the stylesheet enqueuing mode for production.
|
||||
*
|
||||
* @since 2.5.5
|
||||
* @var bool
|
||||
* @see class/init.php
|
||||
*
|
||||
* In production, a minified CSS file tailored to the settings is enqueued.
|
||||
*
|
||||
* Developing stylesheets is meant to be easier when this is set to false.
|
||||
* WARNING: This facility designed for development must NOT be used in production.
|
||||
*/
|
||||
define( 'C_BOOL_CSS_PRODUCTION_MODE', true );
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
author : 'Mark Cheret',
|
||||
authorurl : 'https://cheret.org/footnotes/',
|
||||
infourl : 'https://wordpress.org/plugins/footnotes/',
|
||||
version : "2.5.12"
|
||||
version : "2.5.13"
|
||||
};
|
||||
}
|
||||
});
|
||||
|
|
13
readme.txt
13
readme.txt
|
@ -4,8 +4,8 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen
|
|||
Requires at least: 3.9
|
||||
Tested up to: 5.7
|
||||
Requires PHP: 5.6
|
||||
Package Version: 2.5.12
|
||||
Version: 2.5.12
|
||||
Package Version: 2.5.13
|
||||
Version: 2.5.13
|
||||
Stable Tag: 2.5.10
|
||||
CAUTION: THE S. T. FIELD IS PARSED FOR RELEASE CONFIGURATION.
|
||||
License: GPLv3 or later
|
||||
|
@ -80,6 +80,11 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
|
|||
|
||||
== Changelog ==
|
||||
|
||||
= 2.5.13 =
|
||||
- Bugfix: Dashboard: Backlink symbol: debug select box by reverting identity check to equality check, thanks to @lolzim bug report.
|
||||
- Bugfix: Footnote delimiter short codes: debug closing pointy brackets in the Block Editor by accounting for unbalanced HTML escapement.
|
||||
- Update: Dashboard: General settings: Footnote start and end short codes: update information about short codes using pointy brackets.
|
||||
|
||||
= 2.5.12 =
|
||||
- Update: Scrolling: CSS-based smooth scroll behavior (optional), thanks to @paulgpetty and @bogosavljev issue reports.
|
||||
- Bugfix: Backlinks: reflect scroll functions down/up differentiation across the template set, thanks to @bogosavljev bug report.
|
||||
|
@ -234,7 +239,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.
|
||||
- Bugfix: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed.
|
||||
- Update: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed.
|
||||
- Bugfix: Reference container: edits to optional basic responsive page layout stylesheets.
|
||||
|
||||
= 2.2.1 =
|
||||
|
@ -297,8 +302,8 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
|
|||
- Update: Dashboard: Expert mode: streamline and update description for hooks and priority levels.
|
||||
|
||||
= 2.1.3 =
|
||||
- Bugfix: Hooks: disable widget_text hook by default to fix accordions declaring headings as widgets.
|
||||
- Bugfix: Hooks: disable the_excerpt hook by default to fix issues, thanks to @nikelaos bug report.
|
||||
- Bugfix: Hooks: disable widget_text hook by default to fix accordions declaring headings as widgets.
|
||||
- Bugfix: Reference container: fix column width when combining turned on by reverting new CSS class to legacy.
|
||||
- Bugfix: Reference container: fix width in mobile view by URL wrapping for Unicode-non-conformant browsers, thanks to @karolszakiel bug report.
|
||||
- Bugfix: Reference container: table cell backlinking if index is single and combining identicals turned on.
|
||||
|
|
Reference in a new issue