traceability update 2.5.4d5
git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2472973 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
0612b76412
commit
b9476b682e
9 changed files with 432 additions and 253 deletions
|
@ -6,42 +6,42 @@
|
|||
* @author Stefan Herndler
|
||||
* @since 1.5.0 14.09.14 14:47
|
||||
*
|
||||
* Last modified: 2021-01-22T0545+0100
|
||||
*
|
||||
* Edited:
|
||||
* @lastmodified 2021-02-11T0821+0100
|
||||
*
|
||||
* @since 2.0.4 restore arrow settings 2020-11-01T0509+0100
|
||||
* @since 2.1.0 read-on button label 2020-11-08T2148+0100
|
||||
* @since 2.1.1 options for ref container and alternative tooltips 2020-11-16T2152+0100
|
||||
* @since 2.1.1 Referrers: superscript becomes optional, thanks to @cwbayer bug report
|
||||
* @since 2.1.2 priority level settings for all other hooks, thanks to @nikelaos
|
||||
* @see <https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13676705>
|
||||
* @link https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13676705
|
||||
* @since 2.1.4 settings for ref container, tooltips and scrolling 2020-12-03T0950+0100
|
||||
* @since 2.1.6 slight UI reordering 2020-12-09T1114+0100
|
||||
* @since 2.1.6 option to disable URL line wrapping 2020-12-09T1604+0100
|
||||
* @since 2.1.6 remove expert mode setting as outdated 2020-12-09T2105+0100
|
||||
* @since 2.2.0 start/end short codes: more predefined options, thanks to @nikelaos
|
||||
* @see <https://wordpress.org/support/topic/doesnt-work-with-mailpoet/>
|
||||
* @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/
|
||||
* @since 2.2.0 add options, redistribute, update strings 2020-12-12T2135+0100
|
||||
* @since 2.2.0 shortcode for reference container custom position 2020-12-13T2055+0100
|
||||
* @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-16T1244+0100
|
||||
* @since 2.2.5 support for Ibid. notation thanks to @meglio 2020-12-17T2021+0100
|
||||
* @see <https://wordpress.org/support/topic/add-support-for-ibid-notation/>
|
||||
* @link https://wordpress.org/support/topic/add-support-for-ibid-notation/
|
||||
* @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100
|
||||
* @see <https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/>
|
||||
* @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/
|
||||
* @since 2.2.10 reference container row border option, thanks to @noobishh 2020-12-25T2316+0100
|
||||
* @see <https://wordpress.org/support/topic/borders-25/>
|
||||
* @link https://wordpress.org/support/topic/borders-25/
|
||||
* @since 2.3.0 Reference container: convert top padding to margin and make it a setting, thanks to @hamshe
|
||||
* @see <https://wordpress.org/support/topic/reference-container-in-elementor/#post-13786635>
|
||||
* @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13786635
|
||||
* @since 2.3.0 rename Priority level tab as Scope and priority 2020-12-26T2222+0100
|
||||
* @since 2.3.0 swap Custom CSS migration Boolean from 'migration complete' to 'show legacy' 2020-12-27T1243+0100
|
||||
* @since 2.3.0 mention op. cit. abbreviation 2020-12-28T2342+0100
|
||||
* @since 2.3.0 add settings for hard links, thanks to @psykonevro and @martinneumannat 2020-12-29T1322+0100
|
||||
* @see <https://wordpress.org/support/topic/making-it-amp-compatible/>
|
||||
* @see <https://wordpress.org/support/topic/footnotes-is-not-amp-compatible/>
|
||||
* @link https://wordpress.org/support/topic/making-it-amp-compatible/
|
||||
* @link 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/>
|
||||
* @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -94,8 +94,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
*
|
||||
* Edited:
|
||||
* @since 2.1.6 tabs reordered and renamed
|
||||
* @see customization vs configuration
|
||||
* <https://www.linkedin.com/pulse/20140610191154-4746170-configuration-vs-customization-when-and-why-would-i-implement-each>
|
||||
* @link https://www.linkedin.com/pulse/20140610191154-4746170-configuration-vs-customization-when-and-why-would-i-implement-each
|
||||
*
|
||||
* @since 2.1.6 removed if statement around expert tab
|
||||
*/
|
||||
|
@ -182,7 +181,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
* Completed:
|
||||
* @since 2.1.4: layout and typography options 2020-11-30T0548+0100
|
||||
* @since 2.2.5 options for label element and label bottom border, thanks to @markhillyer 2020-12-18T1447+0100
|
||||
* @see <https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/>
|
||||
* @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/
|
||||
*/
|
||||
public function ReferenceContainer() {
|
||||
|
||||
|
@ -345,14 +344,14 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
*
|
||||
* Edited heading 2020-12-12T1412+0100
|
||||
* @since 2.2.0 start/end short codes: more predefined options 2020-12-12T1412+0100
|
||||
* @see <https://wordpress.org/support/topic/doesnt-work-with-mailpoet/>
|
||||
* @link https://wordpress.org/support/topic/doesnt-work-with-mailpoet/
|
||||
* @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/>
|
||||
* @link 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.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/>
|
||||
* @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/
|
||||
*/
|
||||
public function StartEnd() {
|
||||
// footnotes start tag short code options:
|
||||
|
@ -564,8 +563,8 @@ 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>
|
||||
* @link 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
|
||||
* @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100
|
||||
*/
|
||||
public function Excerpts() {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* @since 1.5.0 12.09.14 10:56
|
||||
*
|
||||
*
|
||||
* @lastmodified 2021-02-08T1910+0100
|
||||
* @lastmodified 2021-02-11T0816+0100
|
||||
*
|
||||
* @since 1.6.5 Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution.
|
||||
* @since 1.6.5 Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution.
|
||||
|
@ -50,7 +50,7 @@ class MCI_Footnotes {
|
|||
* @contributor @felipelavinz
|
||||
* @link https://github.com/media-competence-institute/footnotes/commit/87173d2980c7ff90e12ffee94ca7153e11163793
|
||||
*
|
||||
* @see initializeWidgets()
|
||||
* @see self::initializeWidgets()
|
||||
*/
|
||||
public function run() {
|
||||
// register language
|
||||
|
@ -99,7 +99,7 @@ class MCI_Footnotes {
|
|||
*
|
||||
* The fix is to move add_action() above into run(),
|
||||
* and use the bare register_widget() here.
|
||||
* @see run()
|
||||
* @see self::run()
|
||||
*
|
||||
* Also, the visibility of initializeWidgets() is not private any longer.
|
||||
*/
|
||||
|
|
|
@ -6,27 +6,17 @@
|
|||
* @author Stefan Herndler
|
||||
* @since 1.5.0 14.09.14 10:43
|
||||
*
|
||||
* Last modified: 2021-01-12T2217+0100
|
||||
*
|
||||
* Edited:
|
||||
* @lastmodified 2021-02-11T1130+0100
|
||||
*
|
||||
* @since 2.0.4 restore arrow settings 2020-11-02T2115+0100
|
||||
*
|
||||
* @since 2.0.7 remove hook the_post 2020-11-06T1342+0100
|
||||
*
|
||||
* @since 2.1.0 add read-on button label customization 2020-11-08T2149+0100
|
||||
*
|
||||
* @since 2.1.1 fix tooltips on site by alternative 2020-11-11T1819+0100
|
||||
*
|
||||
* @since 2.1.1 fix disabling backlink symbol 2020-11-16T2021+0100
|
||||
*
|
||||
* @since 2.1.1 fix superscript by making it optional
|
||||
*
|
||||
* @since 2.1.1 fix start pages by option to hide ref container, thanks to @dragon013
|
||||
* @link https://wordpress.org/support/topic/possible-to-hide-it-from-start-page/
|
||||
*
|
||||
* @since 2.1.1 fix ref container by option restoring 3-column layout
|
||||
*
|
||||
* @since 2.1.1 fix ref container by option to switch index/symbol 2020-11-16T2022+0100
|
||||
*
|
||||
* @since 2.1.3 excerpt hook: disable by default, thanks to @nikelaos
|
||||
|
@ -68,28 +58,20 @@
|
|||
* @since 2.4.0 footnote shortcode syntax validation 2021-01-01T0624+0100
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* The class loads all Settings from each WordPress Settings container.
|
||||
* It a Setting is not defined yet, the default value will be used.
|
||||
* Each Setting will be validated and sanitized when loaded from the container.
|
||||
* Loads the settings values, sets to default values if undefined.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*/
|
||||
class MCI_Footnotes_Settings {
|
||||
|
||||
|
||||
/**
|
||||
* SETTINGS CONTAINER KEY DEFINITIONS
|
||||
*/
|
||||
|
||||
/**
|
||||
* Settings Container Key for the label of the reference container.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_REFERENCE_CONTAINER_NAME = "footnote_inputfield_references_label";
|
||||
|
||||
|
@ -98,21 +80,28 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @var bool
|
||||
* @var str
|
||||
* The string is converted to Boolean false if 'no', true if 'yes'.
|
||||
* @see MCI_Footnotes_Convert::toBool()
|
||||
* The type in the variable name is useful to hint the intended use
|
||||
* and IMO should therefore not be changed to _STR_
|
||||
* Else:
|
||||
* @todo Change misleading variable names C_BOOL_… to C_STR_… (that’s how Hungarian screws things up).
|
||||
* @todo Do not convert strings to Booleans: toBool() fixes empty, or empty() must be used everywhere.
|
||||
*/
|
||||
const C_BOOL_REFERENCE_CONTAINER_COLLAPSE = "footnote_inputfield_collapse_references";
|
||||
|
||||
/**
|
||||
* Settings Container Key for the positioning of the reference container.
|
||||
* Settings Container Key for the position of the reference container.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_REFERENCE_CONTAINER_POSITION = "footnote_inputfield_reference_container_place";
|
||||
|
||||
/**
|
||||
* Settings Container Key to combine identical footnotes.
|
||||
* Settings Container Key for combining identical footnotes.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
|
@ -121,38 +110,38 @@ class MCI_Footnotes_Settings {
|
|||
const C_BOOL_COMBINE_IDENTICAL_FOOTNOTES = "footnote_inputfield_combine_identical";
|
||||
|
||||
/**
|
||||
* Settings Container Key for the start of the footnotes short code.
|
||||
* Settings Container Key for the short code of the footnote’s start.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_SHORT_CODE_START = "footnote_inputfield_placeholder_start";
|
||||
|
||||
/**
|
||||
* Settings Container Key for the end of the footnotes short code.
|
||||
* Settings Container Key for the short code of the footnote’s end.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_SHORT_CODE_END = "footnote_inputfield_placeholder_end";
|
||||
|
||||
/**
|
||||
* Settings Container Key for the user defined start of the footnotes short code.
|
||||
* Settings Container Key for the user-defined short code of the footnotes start.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED = "footnote_inputfield_placeholder_start_user_defined";
|
||||
|
||||
/**
|
||||
* Settings Container Key for the user defined end of the footnotes short code.
|
||||
* Settings Container Key for the user-defined short code of the footnotes end.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED = "footnote_inputfield_placeholder_end_user_defined";
|
||||
|
||||
|
@ -161,7 +150,7 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_COUNTER_STYLE = "footnote_inputfield_counter_style";
|
||||
|
||||
|
@ -170,7 +159,7 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_LOVE = "footnote_inputfield_love";
|
||||
|
||||
|
@ -179,7 +168,7 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_BOOL_FOOTNOTES_IN_EXCERPT = "footnote_inputfield_search_in_excerpt";
|
||||
|
||||
|
@ -188,55 +177,61 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.5
|
||||
* @var string
|
||||
* @var str
|
||||
*
|
||||
* @since 2.1.6: this setting removed as irrelevant since priority level setting is permanently visible 2020-12-09T2107+0100
|
||||
* @since 2.1.6 This setting removed as irrelevant since priority level settings need permanent visibility.
|
||||
* @datetime 2020-12-09T2107+0100
|
||||
*/
|
||||
const C_BOOL_FOOTNOTES_EXPERT_MODE = "footnote_inputfield_enable_expert_mode";
|
||||
|
||||
/**
|
||||
* Settings Container Key for the styling before the footnotes index.
|
||||
* Settings Container Key for the string before the footnote referrer.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_STYLING_BEFORE = "footnote_inputfield_custom_styling_before";
|
||||
|
||||
/**
|
||||
* Settings Container Key for the styling after the footnotes index.
|
||||
* Settings Container Key for the string after the footnote referrer.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_STYLING_AFTER = "footnote_inputfield_custom_styling_after";
|
||||
|
||||
/**
|
||||
* Settings Container Key for the mouse-over box to be enabled.
|
||||
* Settings Container Key to enable the mouse-over box.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.2
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED = "footnote_inputfield_custom_mouse_over_box_enabled";
|
||||
|
||||
/**
|
||||
* Settings Container Key for alternative tooltip implementation
|
||||
* Settings Container Key to enable the alternative tooltips.
|
||||
*
|
||||
* @since 2.1.4
|
||||
* @var string
|
||||
* - Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback.
|
||||
*
|
||||
* 2020-11-11T1817+0100
|
||||
* @since 2.1.1
|
||||
* @datetime 2020-11-11T1817+0100
|
||||
*
|
||||
* @reporter @andreasra
|
||||
* @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566
|
||||
*
|
||||
* @var str
|
||||
*/
|
||||
const C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE = "footnote_inputfield_custom_mouse_over_box_alternative";
|
||||
|
||||
/**
|
||||
* Settings Container Key for the mouse-over box to display only an excerpt.
|
||||
* Settings Container Key to enable tooltip truncation.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.4
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED = "footnote_inputfield_custom_mouse_over_box_excerpt_enabled";
|
||||
|
||||
|
@ -245,16 +240,16 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.4
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH = "footnote_inputfield_custom_mouse_over_box_excerpt_length";
|
||||
|
||||
/**
|
||||
* Settings Container Key for the mouse-over box to define the positioning.
|
||||
* Settings Container Key for the mouse-over box to define the position.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.7
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION = "footnote_inputfield_custom_mouse_over_box_position";
|
||||
|
||||
|
@ -263,7 +258,7 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.7
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X = "footnote_inputfield_custom_mouse_over_box_offset_x";
|
||||
|
||||
|
@ -272,7 +267,7 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.7
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y = "footnote_inputfield_custom_mouse_over_box_offset_y";
|
||||
|
||||
|
@ -281,7 +276,7 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.6
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR = "footnote_inputfield_custom_mouse_over_box_color";
|
||||
|
||||
|
@ -290,7 +285,7 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.6
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND = "footnote_inputfield_custom_mouse_over_box_background";
|
||||
|
||||
|
@ -299,7 +294,7 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.6
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH = "footnote_inputfield_custom_mouse_over_box_border_width";
|
||||
|
||||
|
@ -308,7 +303,7 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.6
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR = "footnote_inputfield_custom_mouse_over_box_border_color";
|
||||
|
||||
|
@ -317,16 +312,16 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.6
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS = "footnote_inputfield_custom_mouse_over_box_border_radius";
|
||||
|
||||
/**
|
||||
* Settings Container Key for the mouse-over box to define the max width.
|
||||
* Settings Container Key for the mouse-over box to define the max. width.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.6
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH = "footnote_inputfield_custom_mouse_over_box_max_width";
|
||||
|
||||
|
@ -335,25 +330,25 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.8
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR = "footnote_inputfield_custom_mouse_over_box_shadow_color";
|
||||
|
||||
/**
|
||||
* Settings Container Key for the Hyperlink arrow.
|
||||
* Settings Container Key for the backlink symbol selection.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_HYPERLINK_ARROW = "footnote_inputfield_custom_hyperlink_symbol";
|
||||
|
||||
/**
|
||||
* Settings Container Key for the user defined Hyperlink arrow.
|
||||
* Settings Container Key for the user-defined backlink symbol.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_HYPERLINK_ARROW_USER_DEFINED = "footnote_inputfield_custom_hyperlink_symbol_user";
|
||||
|
||||
|
@ -362,108 +357,187 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @var string
|
||||
* @var str
|
||||
*
|
||||
* Edited heading 2020-12-27T1233+0100
|
||||
* Edited:
|
||||
* @since 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0520+0100
|
||||
* @var string|bool
|
||||
*
|
||||
* @since 2.3.0 swap Boolean from 'migration complete' to 'show legacy' 2020-12-27T1233+0100
|
||||
* The Boolean must be false if its setting is contained in the container to be hidden,
|
||||
* because when saving, all missing constants are zeroed, i.e. this is set to false.
|
||||
* @since 1.3.0 Adding: new settings tab for custom CSS settings.
|
||||
*/
|
||||
const C_STR_CUSTOM_CSS = "footnote_inputfield_custom_css";
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* @datetime 2020-12-15T0520+0100
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_CUSTOM_CSS_NEW = "footnote_inputfield_custom_css_new";
|
||||
|
||||
/**
|
||||
* Settings Container Key to enable display of legacy Custom CSS metaboxes.
|
||||
*
|
||||
* @since 2.2.2
|
||||
* @datetime 2020-12-15T0520+0100
|
||||
* @var str
|
||||
*
|
||||
* @since 2.3.0 swap Boolean from 'migration complete' to 'show legacy'
|
||||
* @datetime 2020-12-27T1233+0100
|
||||
*
|
||||
* The Boolean must be false if its setting is contained in the container to be hidden,
|
||||
* because when saving, all missing constants are emptied, and toBool() converts empty to false.
|
||||
*/
|
||||
const C_BOOL_CUSTOM_CSS_LEGACY_ENABLE = "footnote_inputfield_custom_css_legacy_enable";
|
||||
|
||||
/**
|
||||
* Settings Container Key the activation of the_title hook.
|
||||
* Settings Container Key to enable the 'the_title' hook.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.5
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_BOOL_EXPERT_LOOKUP_THE_TITLE = "footnote_inputfield_expert_lookup_the_title";
|
||||
|
||||
/**
|
||||
* Settings Container Key the activation of the_content hook.
|
||||
* Settings Container Key to enable the 'the_content' hook.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.5
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_BOOL_EXPERT_LOOKUP_THE_CONTENT = "footnote_inputfield_expert_lookup_the_content";
|
||||
|
||||
/**
|
||||
* Settings Container Key the activation of the_excerpt hook.
|
||||
* Settings Container Key to enable the 'the_excerpt' hook.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.5
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_BOOL_EXPERT_LOOKUP_THE_EXCERPT = "footnote_inputfield_expert_lookup_the_excerpt";
|
||||
|
||||
/**
|
||||
* Settings Container Key the activation of widget_title hook.
|
||||
* Settings Container Key to enable the 'widget_title' hook.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.5
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE = "footnote_inputfield_expert_lookup_widget_title";
|
||||
|
||||
/**
|
||||
* Settings Container Key the activation of widget_text hook.
|
||||
* Settings Container Key to enable the 'widget_text' hook.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.5
|
||||
* @var string
|
||||
* @var str
|
||||
*/
|
||||
const C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT = "footnote_inputfield_expert_lookup_widget_text";
|
||||
|
||||
/**
|
||||
* Settings Container Key for the label of the 'Read on' button in truncated tooltips
|
||||
* Settings Container Key for the label of the Read-on button in truncated tooltips.
|
||||
*
|
||||
* - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @var string
|
||||
* @datetime 2020-11-08T2106+0100
|
||||
*
|
||||
* 2020-11-08T2106+0100
|
||||
* @reporter @rovanov
|
||||
* @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/
|
||||
*
|
||||
* @var str
|
||||
*/
|
||||
const C_STR_FOOTNOTES_TOOLTIP_READON_LABEL = "footnote_inputfield_readon_label";
|
||||
|
||||
/**
|
||||
* Settings Container Keys for options fixing default layout
|
||||
* Settings Container Key for the referrer element.
|
||||
*
|
||||
* - Bugfix: Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report.
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @var string
|
||||
* @datetime 2020-11-16T0859+0100
|
||||
*
|
||||
* 2020-11-16T0859+0100
|
||||
*
|
||||
* option to enable/disable the superscript element for referrers, thanks to @cwbayer
|
||||
* @reporter @cwbayer
|
||||
* @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/
|
||||
*
|
||||
* @var str
|
||||
*/
|
||||
const C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS = "footnotes_inputfield_referrer_superscript_tags";
|
||||
|
||||
/**
|
||||
* Settings Container Key to enable the display of a backlink symbol.
|
||||
*
|
||||
* - 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
|
||||
*
|
||||
* @var str
|
||||
*/
|
||||
const C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE = "footnotes_inputfield_reference_container_backlink_symbol_enable";
|
||||
|
||||
/**
|
||||
* Settings Container Key to not display the reference container on the homepage.
|
||||
*
|
||||
* - 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/
|
||||
*
|
||||
* @var str
|
||||
*/
|
||||
const C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE = "footnotes_inputfield_reference_container_start_page_enable";
|
||||
|
||||
/**
|
||||
* Settings Container Key to enable the legacy layout of the reference container.
|
||||
*
|
||||
* - Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column.
|
||||
*
|
||||
* @since 2.1.1
|
||||
*
|
||||
* @var str
|
||||
*/
|
||||
const C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE = "footnotes_inputfield_reference_container_3column_layout_enable";
|
||||
|
||||
/**
|
||||
* Settings Container Key to get the backlink symbol switch side.
|
||||
*
|
||||
* - Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution.
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @datetime 2020-11-16T2024+0100
|
||||
*
|
||||
* @contributor @spaceling
|
||||
* @link https://wordpress.org/support/topic/change-the-position-5/#post-13615994
|
||||
*
|
||||
* @var str
|
||||
*/
|
||||
const C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH = "footnotes_inputfield_reference_container_backlink_symbol_switch";
|
||||
|
||||
/**
|
||||
* Settings Container Keys for hook priority levels
|
||||
* Settings Container Key for 'the_content' hook priority level.
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @datetime 2020-11-16T0859+0100
|
||||
*
|
||||
* @var str
|
||||
*/
|
||||
const C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL = "footnote_inputfield_expert_lookup_the_content_priority_level";
|
||||
|
||||
/**
|
||||
* Settings Container Key for '' hook priority level
|
||||
*
|
||||
* @since 2.1.1 (the_content)
|
||||
* @since 2.1.2
|
||||
* @var string
|
||||
* @datetime 2020-11-20T0620+0100
|
||||
*
|
||||
* 2020-11-16T0859+0100
|
||||
* 2020-11-20T0620+0100
|
||||
* @var str
|
||||
*/
|
||||
const C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL = "footnote_inputfield_expert_lookup_the_title_priority_level";
|
||||
const C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL = "footnote_inputfield_expert_lookup_the_content_priority_level";
|
||||
const C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL = "footnote_inputfield_expert_lookup_the_excerpt_priority_level";
|
||||
const C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL = "footnote_inputfield_expert_lookup_widget_title_priority_level";
|
||||
const C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL = "footnote_inputfield_expert_lookup_widget_text_priority_level";
|
||||
const C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL = "footnote_inputfield_expert_lookup_the_excerpt_priority_level";
|
||||
|
||||
/**
|
||||
* Settings Container Keys for the link element option
|
||||
|
@ -474,7 +548,7 @@ class MCI_Footnotes_Settings {
|
|||
* Settings Container Keys for tooltip display durations
|
||||
*
|
||||
* @since 2.1.4
|
||||
* @var string|bool|int|flo
|
||||
* @var str|bool|int|flo
|
||||
*
|
||||
* 2020-11-26T1002+0100
|
||||
* 2020-11-30T0427+0100
|
||||
|
@ -511,6 +585,15 @@ class MCI_Footnotes_Settings {
|
|||
// page layout support:
|
||||
const C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT = "footnotes_inputfield_page_layout_support";
|
||||
|
||||
/**
|
||||
* Scroll offset and duration
|
||||
*
|
||||
* - 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.
|
||||
*
|
||||
* @since 2.1.4
|
||||
* @datetime 2020-12-05T0538+0100
|
||||
*/
|
||||
// scroll offset and duration:
|
||||
const C_INT_FOOTNOTES_SCROLL_OFFSET = "footnotes_inputfield_scroll_offset";
|
||||
const C_INT_FOOTNOTES_SCROLL_DURATION = "footnotes_inputfield_scroll_duration";
|
||||
|
@ -539,7 +622,7 @@ class MCI_Footnotes_Settings {
|
|||
* Settings Container Key for reference container position shortcode
|
||||
*
|
||||
* @since 2.2.0
|
||||
* @var string
|
||||
* @var str
|
||||
*
|
||||
* 2020-12-13T2056+0100
|
||||
*/
|
||||
|
@ -707,7 +790,7 @@ class MCI_Footnotes_Settings {
|
|||
self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50',
|
||||
self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px',
|
||||
|
||||
// set backlinks column max width:
|
||||
// set backlinks column max. width:
|
||||
self::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no',
|
||||
self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140',
|
||||
self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px',
|
||||
|
@ -910,7 +993,7 @@ class MCI_Footnotes_Settings {
|
|||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @param int $p_int_Index Settings Container Array Key Index.
|
||||
* @return string Settings Container name.
|
||||
* @return str Settings Container name.
|
||||
*/
|
||||
public function getContainer($p_int_Index) {
|
||||
return $this->a_arr_Container[$p_int_Index];
|
||||
|
|
265
class/task.php
265
class/task.php
|
@ -7,34 +7,37 @@
|
|||
* @since 1.5.0
|
||||
*
|
||||
*
|
||||
* @lastmodified 2021-02-10T0027+0100
|
||||
* @lastmodified 2021-02-11T0817+0100
|
||||
*
|
||||
* @since 2.0.0 Bugfix: various.
|
||||
* @since 2.0.5 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 Update: Hooks: Default-enable all hooks to prevent footnotes from seeming broken in some parts.
|
||||
* @since 2.0.6 Bugfix: Infinite scroll: debug autoload by adding post ID, thanks to @docteurfitness code contribution.
|
||||
* @since 2.0.6 Bugfix: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility).
|
||||
* @since 2.0.6 Bugfix: Reference container: fix line breaking behavior in footnote number clusters.
|
||||
* @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.0.9 Bugfix: Remove the_post hook 2020-11-08T1839+0100.
|
||||
* @since 2.1.0 Adding: Tooltips: Read-on button: Label: configurable instead of localizable.
|
||||
* @since 2.1.0 Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision.
|
||||
* @since 2.1.1 Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report.
|
||||
* @since 2.1.1 Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report.
|
||||
* @since 2.1.1 Bugfix: Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report.
|
||||
* @since 2.1.1 Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution.
|
||||
* @since 2.1.1 Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback.
|
||||
* @since 2.1.1 Bugfix: Reference container: option to restore 3-column layout (combining identicals turned off).
|
||||
* @since 2.1.1 Bugfix: Dashboard: priority level setting for the_content hook, thanks to @imeson bug report.
|
||||
* @since 2.1.1 Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback.
|
||||
* @since 2.1.1 Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column.
|
||||
* @since 2.1.2 Bugfix: Dashboard: priority level settings for all other hooks, thanks to @nikelaos bug report.
|
||||
* @since 2.1.3 Bugfix: Reference container: fix width in mobile view by URL wrapping for Unicode-non-conformant browsers, thanks to @karolszakiel bug report.
|
||||
* @since 2.1.4 Bugfix: Styling: Referrers and backlinks: make link elements optional to fix issues.
|
||||
* @since 2.1.4 Bugfix: Reference container: Backlink symbol: support for appending when combining identicals is on.
|
||||
* @since 2.1.4 Bugfix: Reference container: make separating and terminating punctuation optional and configurable.
|
||||
* @since 2.1.4 Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution.
|
||||
* @since 2.1.4 Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks.
|
||||
* @since 2.1.4 Bugfix: Reference container: fix layout issues by moving backlink column width to settings.
|
||||
* @since 2.1.4 Bugfix: Styling: Tooltips: fix font size issue by adding font size to settings with legacy as default.
|
||||
* @since 2.1.4 Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers.
|
||||
* @since 2.1.4 Bugfix: Scroll duration: make configurable to conform to website content and style requirements.
|
||||
* @since 2.1.4 Bugfix: Tooltips: make display delays and fade durations configurable to conform to website style.
|
||||
* @since 2.1.4 Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues.
|
||||
* @since 2.1.4 Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues, thanks to @docteurfitness issue report and code contribution.
|
||||
* @since 2.1.4 Bugfix: Reference container, tooltips: fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element.
|
||||
* @since 2.1.4 Bugfix: Reference container: Backlink symbol: support for appending when combining identicals is on.
|
||||
* @since 2.1.4 Bugfix: Reference container: Backlinks: fix line breaking with respect to separators and terminators.
|
||||
|
@ -64,19 +67,22 @@
|
|||
* @since 2.4.0 Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution.
|
||||
* @since 2.4.0 Bugfix: Process: initialize hard link address variables to empty string to fix 'undefined variable' bug, thanks to @a223123131 bug report.
|
||||
* @since 2.5.0 Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution.
|
||||
* @since 2.5.0 Bugfix: Footnote delimiter syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report.
|
||||
* @since 2.5.0 Bugfix: Footnote delimiter syntax validation: complete message with hint about setting, thanks to @andreasra bug report.
|
||||
* @since 2.5.0 Bugfix: Footnote delimiter syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report.
|
||||
* @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.
|
||||
* @since 2.5.1 Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report.
|
||||
* @since 2.5.2 Update: Tooltips: ability to display dedicated content before `[[/tooltip]]`, thanks to @jbj2199 issue report.
|
||||
* @since 2.5.3 Bugfix: Reference container, tooltips: URL wrap: exclude URL pattern as folder name in Wayback Machine URL, thanks to @rumperuu bug report.
|
||||
* @since 2.5.4 Bugfix: Reference container, tooltips: URL wrap: account for leading space in value, thanks to @karolszakiel example provision.
|
||||
* @since 2.5.4 Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error.
|
||||
*/
|
||||
|
||||
// If called directly, abort:
|
||||
defined( 'ABSPATH' ) or die;
|
||||
|
||||
/**
|
||||
* Looks for Footnotes short codes and replaces them. Also displays the Reference Container.
|
||||
* Searches and replaces the footnotes.
|
||||
* Generates the reference container.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
|
@ -167,7 +173,7 @@ class MCI_Footnotes_Task {
|
|||
* @link https://github.com/misfist/footnotes/releases/tag/2.4.0d3 repository
|
||||
* @link https://github.com/misfist/footnotes/compare/2.4.0%E2%80%A62.4.0d3 diff
|
||||
*
|
||||
* @var bool from DB
|
||||
* @var bool false; depend on settings
|
||||
*
|
||||
* Streamline process depending on tooltip enabled status.
|
||||
* Load tooltip inline script only if jQuery tooltips are enabled.
|
||||
|
@ -207,6 +213,12 @@ class MCI_Footnotes_Task {
|
|||
/**
|
||||
* Scroll offset
|
||||
*
|
||||
* - Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers.
|
||||
*
|
||||
* @since 2.1.4
|
||||
* @datetime 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
|
||||
|
@ -227,25 +239,29 @@ class MCI_Footnotes_Task {
|
|||
/**
|
||||
* Optional link element for footnote referrers and backlinks
|
||||
*
|
||||
* @var str
|
||||
*
|
||||
* @since 2.0.0 add link elements with hard links
|
||||
* @since 2.0.4 remove hard links on user request
|
||||
* @link https://wordpress.org/support/topic/hyperlinked-footnotes-creating-excessive-back-history/
|
||||
*
|
||||
*
|
||||
* - Bugfix: Styling: Referrers and backlinks: make link elements optional to fix issues.
|
||||
* - Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues, thanks to @docteurfitness issue report and code contribution.
|
||||
*
|
||||
* @since 2.1.4
|
||||
* @datetime 2020-11-25T1306+0100
|
||||
* @datetime 2020-11-26T1051+0100
|
||||
*
|
||||
* @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/
|
||||
*
|
||||
*
|
||||
* - Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro bug report, thanks to @martinneumannat code contribution.
|
||||
*
|
||||
* @since 2.3.0
|
||||
* @datetime 2020-12-30T2313+0100
|
||||
* @see $a_bool_HardLinksEnable
|
||||
* @see self::$a_bool_HardLinksEnable
|
||||
*
|
||||
* # Styling
|
||||
*
|
||||
|
@ -266,11 +282,7 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* Link elements also raise further concerns, so that their useless proliferation needs
|
||||
* to be mitigated. By contrast, due to an insufficiency in the CSS standard, real link
|
||||
* elements are required to get the link color, as opposed to named colors on the basis
|
||||
* of the already supported pseudo-classes :link, :hover, :active and :visited that can
|
||||
* still not be used in color names.
|
||||
*
|
||||
*
|
||||
* elements are required to get the link color, as oppose
|
||||
* this variable keeps its default value if hard links are disabled
|
||||
*/
|
||||
public static $a_str_LinkSpan = 'span';
|
||||
|
@ -574,7 +586,7 @@ class MCI_Footnotes_Task {
|
|||
}
|
||||
|
||||
/**
|
||||
* Referernce container top and bottom margins
|
||||
* Reference container top and bottom margins
|
||||
*
|
||||
* - Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report.
|
||||
*
|
||||
|
@ -850,7 +862,18 @@ class MCI_Footnotes_Task {
|
|||
// insert end tag without switching out of PHP:
|
||||
echo "\r\n</style>\r\n";
|
||||
|
||||
// alternative tooltip script printed formatted not minified:
|
||||
/**
|
||||
* Alternative tooltip implementation relying on plain JS and CSS transitions.
|
||||
*
|
||||
* - 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
|
||||
*
|
||||
* Alternative tooltip script: printed formatted, not minified:
|
||||
*/
|
||||
if ( self::$a_bool_AlternativeTooltipsEnabled ) {
|
||||
?>
|
||||
<script content="text/javascript">
|
||||
|
@ -1092,17 +1115,9 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* @since 2.0.0 various.
|
||||
* @since 2.4.0 Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes.
|
||||
*
|
||||
*
|
||||
* - Bugfix: Footnote delimiter syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report.
|
||||
* - Bugfix: Footnote delimiter syntax validation: complete message with hint about setting, thanks to @andreasra bug report.
|
||||
* - Bugfix: Footnote delimiter syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report.
|
||||
*
|
||||
* @since 2.5.0
|
||||
* @datetime 2021-01-07T0824+0100
|
||||
*
|
||||
* @reporter @andreasra
|
||||
* @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/
|
||||
* @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.
|
||||
*/
|
||||
public function search($p_str_Content, $p_bool_ConvertHtmlChars, $p_bool_HideFootnotesText) {
|
||||
|
||||
|
@ -1133,11 +1148,31 @@ class MCI_Footnotes_Task {
|
|||
return $p_str_Content;
|
||||
}
|
||||
|
||||
// if footnotes short codes are unbalanced, and syntax validation is not disabled,
|
||||
// return content with prepended warning:
|
||||
/**
|
||||
* Footnote delimiter syntax validation
|
||||
*
|
||||
* - Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes.
|
||||
*
|
||||
* @since 2.4.0
|
||||
*
|
||||
*
|
||||
* - Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report.
|
||||
* - 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
|
||||
* @datetime 2021-01-07T0824+0100
|
||||
*
|
||||
* @reporter @andreasra
|
||||
* @link https://wordpress.org/support/topic/warning-unbalanced-footnote-start-tag-short-code-before/
|
||||
*
|
||||
*
|
||||
* If footnotes short codes are unbalanced, and syntax validation is not disabled,
|
||||
* prepended a warning to the content; displays de facto beneath the post title.
|
||||
*/
|
||||
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:
|
||||
// make shortcodes conform to regex syntax:
|
||||
$l_str_StartTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_StartingTag );
|
||||
$l_str_EndTagRegex = preg_replace( '#([\(\)\{\}\[\]\*\.\?\!])#', '\\\\$1', $l_str_EndingTag );
|
||||
|
||||
|
@ -1194,6 +1229,7 @@ class MCI_Footnotes_Task {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
// load referrer templates if footnotes text not hidden:
|
||||
if (!$p_bool_HideFootnotesText) {
|
||||
|
||||
|
@ -1204,7 +1240,14 @@ class MCI_Footnotes_Task {
|
|||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote");
|
||||
}
|
||||
|
||||
// call again for robustness when priority levels don’t match any longer:
|
||||
/**
|
||||
* Call Boolean again for robustness when priority levels don’t match any longer.
|
||||
*
|
||||
* - Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error.
|
||||
*
|
||||
* @since 2.5.4
|
||||
* @see self::add_filter('pum_popup_content', array($this, "the_content"), $l_int_TheContentPriority)
|
||||
*/
|
||||
self::$a_bool_TooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED));
|
||||
self::$a_bool_AlternativeTooltipsEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE));
|
||||
|
||||
|
@ -1254,6 +1297,9 @@ class MCI_Footnotes_Task {
|
|||
/**
|
||||
* URL line wrapping for Unicode non conformant browsers
|
||||
*
|
||||
* @since 2.1.1 (CSS)
|
||||
* @since 2.1.4 (PHP)
|
||||
*
|
||||
* Despite Unicode recommends to line-wrap URLs at slashes, and Firefox follows
|
||||
* the Unicode standard, Chrome does not, making long URLs hang out of tooltips
|
||||
* or extend reference containers, so that the end is hidden outside the window
|
||||
|
@ -1262,10 +1308,28 @@ class MCI_Footnotes_Task {
|
|||
* that is assigned appropriate CSS properties and values.
|
||||
* @see css/public.css
|
||||
*
|
||||
* - 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
|
||||
*
|
||||
*
|
||||
* - 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/
|
||||
*
|
||||
*
|
||||
* - Bugfix: Reference container, tooltips: fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element.
|
||||
*
|
||||
* @since 2.1.4
|
||||
* @datetime 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.
|
||||
|
@ -1344,20 +1408,41 @@ class MCI_Footnotes_Task {
|
|||
* - 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/
|
||||
*
|
||||
* 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
|
||||
* @datetime
|
||||
*
|
||||
* @reporter @karolszakiel
|
||||
* @link https://wordpress.org/support/topic/footnotes-on-mobile-phones/
|
||||
*
|
||||
* 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::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED))) {
|
||||
$l_str_FootnoteText = preg_replace( '#(?<![-\w\.!~\*\'\(\);]=[\'"])(?<![-\w\.!~\*\'\(\);]=)(?<!/)((ht|f)tps?://[^\\s<]+)#', '<span class="footnote_url_wrap">$1</span>', $l_str_FootnoteText );
|
||||
if ( MCI_Footnotes_Convert::toBool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED ) ) ) {
|
||||
|
||||
$l_str_FootnoteText = preg_replace(
|
||||
'#(?<![-\w\.!~\*\'\(\);]=[\'"])(?<![-\w\.!~\*\'\(\);]=[\'"] )(?<![-\w\.!~\*\'\(\);]=[\'"] )(?<![-\w\.!~\*\'\(\);]=)(?<!/)((ht|f)tps?://[^\\s<]+)#',
|
||||
'<span class="footnote_url_wrap">$1</span>',
|
||||
$l_str_FootnoteText
|
||||
);
|
||||
}
|
||||
|
||||
// Text to be displayed instead of the footnote
|
||||
$l_str_FootnoteReplaceText = "";
|
||||
|
||||
// whether hard links are enabled; relevant also below in ReferenceContainer():
|
||||
// whether hard links are enabled:
|
||||
if (self::$a_bool_HardLinksEnable) {
|
||||
|
||||
// get the configurable parts:
|
||||
|
@ -1388,11 +1473,14 @@ class MCI_Footnotes_Task {
|
|||
/**
|
||||
* Tooltip truncation
|
||||
*
|
||||
* - Adding: Tooltips: Read-on button: Label: configurable instead of localizable.
|
||||
* - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @datetime 2020-11-08T2146+0100
|
||||
*
|
||||
* @reporter @rovanov
|
||||
* @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/
|
||||
*
|
||||
* 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
|
||||
|
@ -1423,7 +1511,20 @@ class MCI_Footnotes_Task {
|
|||
}
|
||||
|
||||
$l_str_ExcerptText .= '>';
|
||||
|
||||
/**
|
||||
* Configurable read-on button label
|
||||
*
|
||||
* - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @datetime 2020-11-08T2146+0100
|
||||
*
|
||||
* @reporter @rovanov
|
||||
* @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/
|
||||
*/
|
||||
$l_str_ExcerptText .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL);
|
||||
|
||||
$l_str_ExcerptText .= self::$a_bool_HardLinksEnable ? '</a>' : '</span>';
|
||||
}
|
||||
}
|
||||
|
@ -1448,7 +1549,7 @@ class MCI_Footnotes_Task {
|
|||
$l_str_SupSpan = 'span';
|
||||
}
|
||||
|
||||
// whether hard links are enabled; relevant also below in ReferenceContainer():
|
||||
// whether hard links are enabled:
|
||||
if (self::$a_bool_HardLinksEnable) {
|
||||
|
||||
self::$a_str_LinkSpan = 'a';
|
||||
|
@ -1482,12 +1583,13 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* @reporter @a223123131
|
||||
* @link https://wordpress.org/support/topic/wp_debug-php-notice/
|
||||
*
|
||||
* If no hyperlink nor offset anchor is needed, initialize as empty.
|
||||
*/
|
||||
// no hyperlink nor offset anchor needed, initialize as empty:
|
||||
$l_str_FootnoteLinkArgument = '';
|
||||
$l_str_ReferrerAnchorElement = '';
|
||||
|
||||
// whether the link element is used nevertheless for styling:
|
||||
// The link element is set independently as it may be needed for styling:
|
||||
if ( MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED)) ) {
|
||||
|
||||
self::$a_str_LinkSpan = 'a';
|
||||
|
@ -1580,8 +1682,12 @@ class MCI_Footnotes_Task {
|
|||
* @since 1.5.0
|
||||
* @return string
|
||||
*
|
||||
* @since 2.0.6 fix line breaking behavior in footnote number clusters
|
||||
* @since 2.1.1 fix fragment IDs and backlinks with combine identical turned on 2020-11-14T1808+0100
|
||||
* @since 2.0.0 Update: remove backlink symbol along with column 2 of the reference container
|
||||
* @since 2.0.3 Bugfix: prepend an arrow on user request
|
||||
* @since 2.0.6 Bugfix: Reference container: fix line breaking behavior in footnote number clusters.
|
||||
* @since 2.0.4 Bugfix: restore the arrow select and backlink symbol input settings
|
||||
* @since 2.1.1 Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report.
|
||||
* @since 2.1.1 Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback.
|
||||
*/
|
||||
public function ReferenceContainer() {
|
||||
|
||||
|
@ -1594,18 +1700,14 @@ class MCI_Footnotes_Task {
|
|||
/**
|
||||
* Footnote index backlink symbol
|
||||
*
|
||||
* @since 2.0.0 Update: remove backlink symbol along with column 2 of the reference container
|
||||
* @since 2.0.3 Bugfix: prepend an arrow on user request
|
||||
* @since 2.0.4 Bugfix: restore the arrow select and backlink symbol input settings
|
||||
* @since 2.1.1 Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback.
|
||||
*
|
||||
*
|
||||
* - 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:
|
||||
*/
|
||||
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE))) {
|
||||
|
||||
|
@ -1627,7 +1729,7 @@ class MCI_Footnotes_Task {
|
|||
|
||||
} else {
|
||||
|
||||
// if it is not, set arrow to empty:
|
||||
// If the backlink symbol isn’t enabled, set it to empty:
|
||||
$l_str_Arrow = '';
|
||||
$l_str_FootnoteArrow = '';
|
||||
|
||||
|
@ -1637,20 +1739,23 @@ class MCI_Footnotes_Task {
|
|||
/**
|
||||
* Backlink separator
|
||||
*
|
||||
* - Bugfix: Reference container: make separating and terminating punctuation optional and configurable.
|
||||
* - Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution.
|
||||
*
|
||||
* @since 2.1.4
|
||||
* @datetime 2020-11-28T1048+0100
|
||||
*
|
||||
* @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 the separator is optional, has options, and is configurable:
|
||||
*/
|
||||
|
||||
// check if it is even enabled:
|
||||
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED))) {
|
||||
|
||||
// if so, check if it is freely configured:
|
||||
// check if it is input-configured:
|
||||
$l_str_Separator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM);
|
||||
|
||||
if (empty($l_str_Separator)) {
|
||||
|
@ -1677,11 +1782,9 @@ class MCI_Footnotes_Task {
|
|||
* making it optional was envisaged.
|
||||
* @since 2.1.4 the terminator is optional, has options, and is configurable:
|
||||
*/
|
||||
|
||||
// check if it is even enabled:
|
||||
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED))) {
|
||||
|
||||
// if so, check if it is input-configured:
|
||||
// check if it is input-configured:
|
||||
$l_str_Terminator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM);
|
||||
|
||||
if (empty($l_str_Terminator)) {
|
||||
|
@ -1727,7 +1830,8 @@ class MCI_Footnotes_Task {
|
|||
/**
|
||||
* Reference container table row template load
|
||||
*
|
||||
* Reference container: option to restore 3-column layout (combining identicals turned off)
|
||||
* - Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column.
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @datetime 2020-11-16T2024+0100
|
||||
*/
|
||||
|
@ -1777,13 +1881,9 @@ class MCI_Footnotes_Task {
|
|||
*/
|
||||
$l_bool_SymbolSwitch = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH));
|
||||
|
||||
// FILL IN THE TEMPLATE
|
||||
|
||||
// loop through all footnotes found in the page
|
||||
for ($l_int_Index = 0; $l_int_Index < count(self::$a_arr_Footnotes); $l_int_Index++) {
|
||||
|
||||
// TEXT COLUMN
|
||||
|
||||
// get footnote text
|
||||
$l_str_FootnoteText = self::$a_arr_Footnotes[$l_int_Index];
|
||||
|
||||
|
@ -1800,10 +1900,11 @@ class MCI_Footnotes_Task {
|
|||
// keep supporting legacy index placeholder:
|
||||
$l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE));
|
||||
|
||||
|
||||
// INDEX COLUMN WITH ONE BACKLINK PER TABLE ROW
|
||||
|
||||
// if enabled, and for the case the footnote is single, compose hard link:
|
||||
/**
|
||||
* Case of only 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 = '';
|
||||
|
||||
|
@ -1837,10 +1938,10 @@ class MCI_Footnotes_Task {
|
|||
* Support for combining identicals: compose enumerated backlinks
|
||||
*
|
||||
* - Bugfix: Referrers, reference container: Combining identical footnotes: fix dead links and ensure referrer-backlink bijectivity, thanks to @happyches bug report.
|
||||
*
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @datetime 2020-11-14T2233+0100
|
||||
*
|
||||
*
|
||||
* @reporter @happyches
|
||||
* @link https://wordpress.org/support/topic/custom-css-for-jumbled-references/
|
||||
*
|
||||
|
@ -1937,14 +2038,16 @@ class MCI_Footnotes_Task {
|
|||
$l_str_FootnoteBacklinks .= ' id="footnote_plugin_reference_';
|
||||
$l_str_FootnoteBacklinks .= self::$a_int_PostId;
|
||||
$l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId;
|
||||
$l_str_FootnoteBacklinks .= "_$l_str_FootnoteId\"";
|
||||
$l_str_FootnoteBacklinks .= "_$l_str_FootnoteId\"";
|
||||
|
||||
// insert the optional hard link address:
|
||||
if (self::$a_bool_HardLinksEnable) {
|
||||
$l_str_FootnoteBacklinks .= ' href="#';
|
||||
$l_str_FootnoteBacklinks .= self::$a_str_ReferrerLinkSlug;
|
||||
$l_str_FootnoteBacklinks .= self::$a_str_PostContainerIdCompound;
|
||||
$l_str_FootnoteBacklinks .= $l_str_FootnoteId . '"';
|
||||
}
|
||||
}
|
||||
|
||||
$l_str_FootnoteBacklinks .= ' class="footnote_backlink"';
|
||||
$l_str_FootnoteBacklinks .= ' onclick="footnote_moveToAnchor_';
|
||||
$l_str_FootnoteBacklinks .= self::$a_int_PostId;
|
||||
|
@ -1952,7 +2055,8 @@ class MCI_Footnotes_Task {
|
|||
$l_str_FootnoteBacklinks .= "('footnote_plugin_tooltip_";
|
||||
$l_str_FootnoteBacklinks .= self::$a_int_PostId;
|
||||
$l_str_FootnoteBacklinks .= '_' . self::$a_int_ReferenceContainerId;
|
||||
$l_str_FootnoteBacklinks .= "_$l_str_FootnoteId');\">";
|
||||
$l_str_FootnoteBacklinks .= "_$l_str_FootnoteId');\">";
|
||||
|
||||
// append the offset anchor for optional hard links:
|
||||
if (self::$a_bool_HardLinksEnable) {
|
||||
$l_str_FootnoteBacklinks .= '<span class="footnote_item_base"><span id="';
|
||||
|
@ -1960,7 +2064,8 @@ class MCI_Footnotes_Task {
|
|||
$l_str_FootnoteBacklinks .= self::$a_str_PostContainerIdCompound;
|
||||
$l_str_FootnoteBacklinks .= $l_str_FootnoteId;
|
||||
$l_str_FootnoteBacklinks .= '" class="footnote_item_anchor"></span></span>';
|
||||
}
|
||||
}
|
||||
|
||||
$l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? '' : $l_str_FootnoteArrow;
|
||||
$l_str_FootnoteBacklinks .= $l_str_FootnoteId;
|
||||
$l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? $l_str_FootnoteArrow : '';
|
||||
|
@ -2055,18 +2160,8 @@ class MCI_Footnotes_Task {
|
|||
* 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.
|
||||
*/
|
||||
// prevent empty from being less robust:
|
||||
$l_str_ReferenceContainerLabel = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME);
|
||||
|
||||
/**
|
||||
* Scroll offset and duration
|
||||
*
|
||||
* - 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.
|
||||
*
|
||||
* @since 2.1.4
|
||||
* @datetime 2020-12-05T0538+0100
|
||||
*/
|
||||
// load 'templates/public/reference-container.html':
|
||||
$l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container");
|
||||
$l_obj_TemplateContainer->replace(
|
||||
|
|
|
@ -24,6 +24,7 @@ Edited:
|
|||
@since 2.0.0 Reference container: Collapse button: fix text decoration
|
||||
@since 2.0.1 enforce borderless table cells through !important property, thanks to @ragonesi bug report
|
||||
@since 2.1.1 Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report
|
||||
@since 2.1.1 Bugfix: Tooltips: fix line breaking for hyperlinked URLs in Unicode-non-compliant user agents, thanks to @andreasra bug report.
|
||||
@since 2.1.6 set z-index to maximum 2147483647 to address display issues with overlay content, thanks to @russianicons bug report
|
||||
@since 2.3.0 offset anchors for optional hard links, thanks to @psychonevro @martinneumannat bug reports
|
||||
@since 2.4.0 validation error warning box
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
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.4d4
|
||||
Version: 2.5.4d5
|
||||
Author URI: http://cheret.de/plugins/footnotes-2/
|
||||
Text Domain: footnotes
|
||||
Domain Path: /languages
|
||||
|
@ -18,10 +18,10 @@
|
|||
* @since 2.1.4
|
||||
* @since 2.5.3 (Hungarian)
|
||||
* @var str
|
||||
* @lastmodified 2021-02-10T0028+0100
|
||||
* @lastmodified 2021-02-11T1131+0100
|
||||
* @committer @pewgeuges
|
||||
*/
|
||||
define( 'C_STR_FOOTNOTES_VERSION', '2.5.4d4' );
|
||||
define( 'C_STR_FOOTNOTES_VERSION', '2.5.4d5' );
|
||||
|
||||
/*
|
||||
LICENSE NOTICE
|
||||
|
|
33
readme.txt
33
readme.txt
|
@ -79,12 +79,13 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
|
|||
|
||||
== Changelog ==
|
||||
|
||||
= 2.5.4d4 =
|
||||
= 2.5.4d5 =
|
||||
- Update: Libraries: jQuery Tools: replace deprecated function jQuery.isFunction(), thanks to @a223123131 bug report.
|
||||
- Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error.
|
||||
- Bugfix: Libraries: jQuery Tools: replace discouraged double equals sign with recommended triple equals sign.
|
||||
- Bugfix: Editor button: Classic Editor text mode: try to fix uncaught reference error of “QTags is not defined”, thanks to @dpartridge bug report.
|
||||
- Bugfix: Reference container, tooltips: URL wrap: account for leading space in value, thanks to @karolszakiel example provision.
|
||||
- Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error.
|
||||
- Bugfix: Editor button: Classic Editor text mode: correct label to singular.
|
||||
- Bugfix: Libraries: jQuery Tools: replace discouraged double equals sign with recommended triple equals sign.
|
||||
|
||||
= 2.5.3 =
|
||||
- Bugfix: Reference container, tooltips: URL wrap: exclude URL pattern as folder name in Wayback Machine URL, thanks to @rumperuu bug report.
|
||||
|
@ -105,10 +106,10 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
|
|||
= 2.5.0 =
|
||||
- Adding: Templates: Enable template location stack, thanks to @misfist code contribution.
|
||||
- Bugfix: Hooks: support footnotes on category pages, thanks to @vitaefit bug report, thanks to @misfist code contribution.
|
||||
- Bugfix: Footnote delimiter syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report.
|
||||
- Bugfix: Footnote delimiter syntax validation: complete message with hint about setting, thanks to @andreasra bug report.
|
||||
- Bugfix: Footnote delimiter syntax validation: limit length of quoted string to 300 characters, thanks to @andreasra bug report.
|
||||
- Update: Dashboard: Footnote delimiter syntax validation: add more information around the setting.
|
||||
- Bugfix: Footnote delimiters: Syntax validation: exclude certain cases involving scripts, thanks to @andreasra bug report.
|
||||
- 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.
|
||||
- Update: Dashboard: Footnote delimiters: Syntax validation: add more information around the setting.
|
||||
- Bugfix: Dashboard: Footnote delimiters: warning about '>' escapement disruption in WordPress Block Editor.
|
||||
|
||||
= 2.4.0 =
|
||||
|
@ -213,10 +214,10 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
|
|||
- Bugfix: Tooltips: Styling: 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: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution.
|
||||
- Bugfix: Reference container: Backlinks: fix stacked enumerations by adding optional line breaks.
|
||||
- Bugfix: Layout: Tooltips: prevent line break in Read-on link label.
|
||||
- Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues.
|
||||
- Bugfix: Tooltips: Read-on button: Label: prevent line breaks.
|
||||
- Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues, thanks to @docteurfitness issue report and code contribution.
|
||||
- Bugfix: Referrers: Styling: disable hover underline.
|
||||
- Bugfix: Reference container, tooltips: fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element.
|
||||
- Bugfix: Reference container: Backlink symbol: support for appending when combining identicals is on.
|
||||
|
@ -237,7 +238,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
|
|||
- 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: 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 wrt Unicode-non-conformant browsers.
|
||||
- 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.
|
||||
- Bugfix: Styling: raise Custom CSS priority to override settings.
|
||||
- Bugfix: Styling: Tooltips: raise settings priority to override theme style sheets.
|
||||
|
@ -258,21 +259,21 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
|
|||
- Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report.
|
||||
- Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback.
|
||||
- Bugfix: Reference container: Footnote number links: disable bottom border for theme compatibility.
|
||||
- Bugfix: Reference container: option to restore 3-column layout (combining identicals turned off).
|
||||
- Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column.
|
||||
- Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution.
|
||||
- Bugfix: Reference container: Table rows: fix top and bottom padding.
|
||||
- Bugfix: Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report.
|
||||
- Bugfix: Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report.
|
||||
- Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback.
|
||||
- Bugfix: Tooltips: add delay (400ms) before fade-out to fix UX wrt links and Read-on button.
|
||||
- Bugfix: Tooltips: fix line breaking for hyperlinked URLs in Unicode-non-compliant user agents.
|
||||
- Bugfix: Tooltips: fix line breaking for hyperlinked URLs in Unicode-non-compliant user agents, thanks to @andreasra bug report.
|
||||
- Bugfix: Formatting: disable overline showing in some themes on hovered backlinks.
|
||||
|
||||
= 2.1.0 =
|
||||
- Adding: Tooltips: Read-on button: Label: configurable instead of localizable.
|
||||
- Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision.
|
||||
- Bugfix: Referrers: disable bottom border for theme compatibility.
|
||||
- Update: Accessibility: add 'speaker-mute' class to reference container.
|
||||
- Bugfix: Dashboard: Layout: added named selectors to limit applicability of styles.
|
||||
- Bugfix: Dashboard: Layout: add named selectors to limit applicability of styles.
|
||||
- UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook.
|
||||
|
||||
= 2.0.8 =
|
||||
|
@ -287,7 +288,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
|
|||
= 2.0.6 =
|
||||
- Bugfix: Infinite scroll: debug autoload by adding post ID, thanks to @docteurfitness code contribution.
|
||||
- Bugfix: Referrers: delete vertical align tweaks, for cross-theme and user agent compatibility.
|
||||
- Bugfix: Reference container: fix line breaking behavior in footnote # clusters.
|
||||
- Bugfix: Reference container: fix line breaking behavior in footnote backlink clusters.
|
||||
- Bugfix: Reference container: auto-extending column to fit widest, to fix display with short note texts.
|
||||
- Bugfix: Reference container: IDs: slightly increased left padding.
|
||||
- Bugfix: Translations: fix spelling error and erroneously changed word in en_GB and en_US.
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
|
||||
/**
|
||||
* Default table row template for uncombined footnotes
|
||||
*
|
||||
* @since 2.2.10 Bugfix: Reference container: add missing container ID in function name in default table row template for uncombined footnotes.
|
||||
*
|
||||
* Default table row template for uncombined footnotes
|
||||
*
|
||||
* @since 2.2.10 Bugfix: Reference container: add missing container ID in function name in default table row template for uncombined footnotes.
|
||||
*
|
||||
*/?>
|
||||
-->
|
||||
<tr class="footnotes_plugin_reference_row">
|
||||
|
|
Reference in a new issue