diff --git a/class/dashboard/layout.php b/class/dashboard/layout.php index 1fff4e7..0a04acb 100644 --- a/class/dashboard/layout.php +++ b/class/dashboard/layout.php @@ -6,13 +6,14 @@ * @author Stefan Herndler * @since 1.5.0 12.09.14 10:56 * - * Edited: - * 2.1.2 add versioning of settings.css for cache busting 2020-11-19T1456+0100 - * 2.1.4 automate passing version number for cache busting 2020-11-30T0648+0100 - * 2.1.4 optional step argument and support for floating in numbox 2020-12-05T0540+0100 - * 2.1.6 fix punctuation-related localization issue in dashboard labels 2020-12-08T1547+0100 + * @lastmodified 2021-02-16T0101+0100 * - * Last modified: 2021-01-22T0440+0100 + * @since 2.1.2 add versioning of settings.css for cache busting 2020-11-19T1456+0100 + * @since 2.1.4 automate passing version number for cache busting 2020-11-30T0648+0100 + * @since 2.1.4 optional step argument and support for floating in numbox 2020-12-05T0540+0100 + * @since 2.1.6 fix punctuation-related localization issue in dashboard labels 2020-12-08T1547+0100 + * + * @since 2.5.5 Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. */ @@ -115,9 +116,9 @@ abstract class MCI_Footnotes_LayoutEngine { */ protected function addMetaBox($p_str_SectionID, $p_str_ID, $p_str_Title, $p_str_CallbackFunctionName) { return array( - "parent" => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_SectionID, - "id" => $p_str_ID, - "title" => $p_str_Title, + "parent" => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_SectionID, + "id" => $p_str_ID, + "title" => $p_str_Title, "callback" => $p_str_CallbackFunctionName ); } @@ -210,13 +211,35 @@ abstract class MCI_Footnotes_LayoutEngine { wp_enqueue_script('wp-color-picker'); - // register stylesheet - // added version # after changes started to settings.css from 2.1.2 on: - // automated update of version number for cache busting - wp_register_style( 'mci-footnotes-admin-styles', plugins_url('footnotes/css/settings.css'), array(), C_STR_FOOTNOTES_VERSION ); + /** + * Registers and enqueues the dashboard stylesheet. + * + * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. + * + * @since 2.5.5 + * @date 2021-02-14T1928+0100 + * + * @reporter @docteurfitness + * @link https://wordpress.org/support/topic/simply-speed-optimisation/ + * + * See the public stylesheet enqueuing: + * @see class/init.php + * + * added version # after changes started to settings.css from 2.1.2 on. + * 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 ) { - // add stylesheet to the output - wp_enqueue_style('mci-footnotes-admin-styles'); + wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.min.css' ), array(), C_STR_FOOTNOTES_VERSION ); + + } else { + + wp_register_style( 'mci-footnotes-admin', plugins_url( 'footnotes/css/settings.css' ), array(), C_STR_FOOTNOTES_VERSION ); + + } + + wp_enqueue_style('mci-footnotes-admin'); } /** diff --git a/class/init.php b/class/init.php index 006c5e0..a2a1061 100644 --- a/class/init.php +++ b/class/init.php @@ -7,7 +7,7 @@ * @since 1.5.0 12.09.14 10:56 * * - * @lastmodified 2021-02-11T0816+0100 + * @lastmodified 2021-02-16T0258+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. @@ -16,7 +16,11 @@ * @since 2.0.3 add versioning of public.css for cache busting 2020-10-29T1413+0100 * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 * @since 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100 - * @since 2.1.4 optionally enqueue an extra style sheet 2020-12-04T2231+0100 + * @since 2.1.4 optionally enqueue an extra stylesheet 2020-12-04T2231+0100 + * + * @since 2.5.5 Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. + * @since 2.5.5 Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. + * @since 2.5.5 Bugfix: Libraries: optimize processes by loading external and internal scripts only if needed, thanks to @docteurfitness issue report. */ /** @@ -36,6 +40,29 @@ class MCI_Footnotes { */ public $a_obj_Task = null; + /** + * Template process and script / stylesheet load optimization. + * + * - Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution. + * + * @since 2.4.0 + * @date 2021-01-04T1355+0100 + * + * @author Patrizia Lutz @misfist + * + * @link https://wordpress.org/support/topic/template-override-filter/#post-13864301 + * @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 + * + * Streamline process depending on tooltip enabled status. + * Load tooltip inline script only if jQuery tooltips are enabled. + * Actual value depends on settings. + */ + public static $a_bool_TooltipsEnabled = false; + public static $a_bool_AlternativeTooltipsEnabled = false; + /** * Executes the Plugin. * @@ -134,50 +161,48 @@ class MCI_Footnotes { * @author Stefan Herndler * @since 1.5.0 * - * - * - Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. - * - * @since 2.0.0 - * Updated for v2.0.4 by adding jQuery UI from WordPress following @check2020de: - * - * See - * - * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. * @since 2.0.0 Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. * @since 2.0.3 add versioning of public.css for cache busting 2020-10-29T1413+0100 * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 * @since 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100 - * @since 2.1.4 optionally enqueue an extra style sheet 2020-12-04T2231+0100 + * @since 2.1.4 optionally enqueue an extra stylesheet 2020-12-04T2231+0100 */ public function registerPublic() { - //### SCRIPTS + /** + * Enqueues external scripts. + * + * - Bugfix: Libraries: optimize processes by loading external and internal scripts only if needed, thanks to @docteurfitness issue report. + * + * @since 2.5.5 + * @reporter @docteurfitness + * @link https://wordpress.org/support/topic/simply-speed-optimisation/ + * + * The condition about tooltips was missing, only the not-alternative-tooltips part was present. + */ - // These are only enqueued if the jQuery tooltips are enabled. - // If alternative tooltips are enabled, these libraries are not needed. - // Scroll animation doesn’t seem to need even jQuery Core or it gets it from elsewhere. - // @since 2.0.0 add jQueryUI from Cloudflare 2020-10-26T1907+0100 - // @since 2.0.3 add versioning of public.css for cache busting 2020-10-29T1413+0100 - // @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 - // @since 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100 - // @since 2.1.4 optionally enqueue an extra style sheet 2020-12-04T2231+0100 + /** + * Enqueues the jQuery library registered by WordPress. + * + * jQuery is also used for animated scrolling, so it should be loaded by default. + * The function wp_enqueue_script() avoids loading the same library multiple times. + */ + wp_enqueue_script( 'jquery' ); - if (!MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE))) { + // set conditions re-used for stylesheet enqueuing: + 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 ) ); - // enqueue the jQuery plugin registered by WordPress: - wp_enqueue_script( 'jquery' ); + if ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) { - // enqueue jQuery UI libraries registered by WordPress, needed for tooltips: - wp_enqueue_script( 'jquery-ui-core' ); - wp_enqueue_script( 'jquery-ui-widget' ); - wp_enqueue_script( 'jquery-ui-position' ); - wp_enqueue_script( 'jquery-ui-tooltip' ); - - // enqueue jQuery Tools: - // redacted jQuery.browser, completed minification; - // see full header in js/jquery.tools.js - // added versioning 2020-11-18T2150+0100 - // not use '-js' in the handle, is appended automatically + /** + * Enqueues the jQuery Tools library shipped with the plugin. + * + * redacted jQuery.browser, completed minification; + * see full header in js/jquery.tools.js + * added versioning 2020-11-18T2150+0100 + * not use '-js' in the handle, is appended automatically + */ wp_enqueue_script( 'mci-footnotes-jquery-tools', plugins_url('footnotes/js/jquery.tools.min.js'), @@ -185,49 +210,150 @@ class MCI_Footnotes { '1.2.7.redacted.2' ); - - // Alternatively, fetch jQuery UI from cdnjs.cloudflare.com: - // Used to add jQuery UI following @vonpiernik: - // : - // This was enabled in Footnotes v2.0.0 through v2.0.3. - // Re-added for 2.0.9d1 / 2.1.1d0 to look whether it can fix a broken tooltip display. 2020-11-07T1601+0100/2020-11-08T2246+0100 + /** + * Registers jQuery UI from the JavaScript Content Delivery Network. + * + * - Update: Tooltips: fix disabling bug by loading jQuery UI library, thanks to @rajinderverma @ericcorbett2 @honlapdavid @mmallett bug reports, thanks to @vonpiernik code contribution. + * + * @since 2.0.0 + * Alternatively, fetch jQuery UI from cdnjs.cloudflare.com: + * @since 2.0.0 add jQueryUI from Cloudflare 2020-10-26T1907+0100 + * Used to add jQuery UI following @vonpiernik: + * : + * + * + * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. + * + * Updated for v2.0.4 by adding jQuery UI from WordPress following @check2020de: + * + * See + * + * This was enabled in Footnotes v2.0.0 through v2.0.3. + * Re-added for 2.0.9d1 / 2.1.1d0 to look whether it can fix a broken tooltip display. 2020-11-07T1601+0100/2020-11-08T2246+0100 + */ //wp_register_script( 'jQueryUI', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', null, null, false ); // in header 2020-11-09T2003+0100 //wp_enqueue_script( 'jQueryUI' ); - // This is then needed instead of the above first instance: - // Add jQuery Tools and finish adding jQueryUI: 2020-11-08T1638+0100/2020-11-08T2246+0100 + /** + * This is then needed instead of the above first instance: + * Add jQuery Tools and finish adding jQueryUI: 2020-11-08T1638+0100/2020-11-08T2246+0100 + */ //wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']); + /** + * Enqueues some jQuery UI libraries registered by WordPress. + * + * @since 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100 + * If alternative tooltips are enabled, these libraries are not needed. + */ + wp_enqueue_script( 'jquery-ui-core' ); + wp_enqueue_script( 'jquery-ui-widget' ); + wp_enqueue_script( 'jquery-ui-position' ); + wp_enqueue_script( 'jquery-ui-tooltip' ); + } + /** + * Enables enqueuing a new-scheme stylesheet. + * + * @since 2.5.5 + * @date 2021-02-14T1512+0100 + * + * Enables enqueuing the formatted individual stylesheets if false. + * WARNING: This facility is designed for development and must NOT be used in production. + * + * 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 ) { - //### STYLES + /** + * Enqueues a minified united external stylesheet in production. + * + * - Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. + * - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report. + * + * @since 2.5.5 + * @date 2021-02-14T1543+0100 + * + * @contributor @docteurfitness + * @link https://wordpress.org/support/topic/simply-speed-optimisation/ + * + * @reporter @docteurfitness + * @link https://wordpress.org/support/topic/simply-speed-optimisation/ + * + * The dashboard stylesheet is minified as-is. + * @see class/dashboard/layout.php + * + * @since 2.0.3 add versioning of public.css for cache busting. + * @date 2020-10-29T1413+0100 + * Plugin version number is needed for busting browser caches after each plugin update. + * @since 2.1.4 automate passing version number for cache busting. + * @date 2020-11-30T0646+0100 + * The constant C_STR_FOOTNOTES_VERSION is defined at start of footnotes.php. + * + * The media scope argument 'all' is the default. + * No need to use '-css' in the handle, as this is appended automatically. + */ + // set tooltip mode for use in stylesheet name: + if ( self::$a_bool_TooltipsEnabled ) { + if ( self::$a_bool_AlternativeTooltipsEnabled ) { + $l_str_TooltipMode = 'al'; + $l_str_TComplement = 'ternative-tooltips'; + } else { + $l_str_TooltipMode = 'jq'; + $l_str_TComplement = 'uery-tooltips'; + } + } else { + $l_str_TooltipMode = 'no'; + $l_str_TComplement = '-tooltips'; + } - // up-to-date plugin version number needed for cache busting: - // not use '-css' in the handle, is appended automatically; - // constant C_STR_FOOTNOTES_VERSION defined in footnotes.php, media all is default - wp_enqueue_style( - 'mci-footnotes-public', - plugins_url( - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/public.css' - ), - array(), - C_STR_FOOTNOTES_VERSION, - 'all' - ); + // set basic responsive page layout mode for use in stylesheet name: + $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); + switch ( $l_str_PageLayoutOption ) { + case "reference-container": $l_str_LayoutMode = '1'; break; + case "entry-content" : $l_str_LayoutMode = '2'; break; + case "main-content" : $l_str_LayoutMode = '3'; break; + case "none": default: $l_str_LayoutMode = '0'; break; + } - // optional layout fix by lack of layout support: - // since 2.1.4 2020-12-05T1417+0100 - $l_str_LayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); - if ($l_str_LayoutOption != 'none') { + // enqueue the tailored united minified stylesheet: wp_enqueue_style( - 'mci-footnotes-layout-' . $l_str_LayoutOption, + 'mci-footnotes-' . $l_str_TooltipMode . $l_str_TComplement . '-pagelayout-' . $l_str_PageLayoutOption, plugins_url( - MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/layout-' . $l_str_LayoutOption . '.css' + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/footnotes-' . $l_str_TooltipMode . 'ttbrpl' . $l_str_LayoutMode . '.min.css' ), array(), C_STR_FOOTNOTES_VERSION, 'all' ); + + } else { + + /** + * Enqueues external stylesheets, ONLY in development now. + * + * @since 2.1.4 optionally enqueue an extra stylesheet. + * @date 2020-12-04T2231+0100 + * + * This optional layout fix is useful by lack of layout support. + */ + wp_enqueue_style( 'mci-footnotes-common', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-common.css' ), array(), C_STR_FOOTNOTES_VERSION ); + wp_enqueue_style( 'mci-footnotes-tooltips', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips.css' ), array(), C_STR_FOOTNOTES_VERSION ); + wp_enqueue_style( 'mci-footnotes-alternative', plugins_url( MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-tooltips-alternative.css' ), array(), C_STR_FOOTNOTES_VERSION ); + + $l_str_PageLayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT); + if ($l_str_PageLayoutOption != 'none') { + wp_enqueue_style( + 'mci-footnotes-layout-' . $l_str_PageLayoutOption, + plugins_url( + MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/css/dev-layout-' . $l_str_PageLayoutOption . '.css' + ), + array(), + C_STR_FOOTNOTES_VERSION, + 'all' + ); + } } } } diff --git a/class/language.php b/class/language.php index a7f5500..2a16db7 100644 --- a/class/language.php +++ b/class/language.php @@ -42,7 +42,7 @@ class MCI_Footnotes_Language { * - Bugfix: Correct function call apply_filters() with all required arguments after PHP 7.1 promoted warning to error, thanks to @matkus2 bug report and code contribution. * * @since 2.0.0 - * @datetime 2020-10-26T1609+0100 + * @date 2020-10-26T1609+0100 * * @contributor @matkus2 * @link https://wordpress.org/support/topic/error-missing-parameter-if-using-php-7-1-or-later/ @@ -87,7 +87,7 @@ class MCI_Footnotes_Language { * - Bugfix: Localization: conform to WordPress plugin language file name scheme, thanks to @nikelaos bug report. * * @since 2.1.6 - * @datetime 2020-12-08T1931+0100 + * @date 2020-12-08T1931+0100 * * @reporter @nikelaos * @link https://wordpress.org/support/topic/more-feature-ideas/ diff --git a/class/settings.php b/class/settings.php index 99828f6..3fb12f0 100644 --- a/class/settings.php +++ b/class/settings.php @@ -7,7 +7,7 @@ * @since 1.5.0 14.09.14 10:43 * * - * @lastmodified 2021-02-12T1744+0100 + * @lastmodified 2021-02-16T0101+0100 * * @since 2.0.4 restore arrow settings 2020-11-02T2115+0100 * @since 2.0.7 remove hook the_post 2020-11-06T1342+0100 @@ -51,7 +51,7 @@ * @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. - * @datetime 2020-12-27T1243+0100 + * @date 2020-12-27T1243+0100 * @since 2.3.0 referrers, reference container: settings for anchor slugs 2020-12-31T1429+0100 * @@ -180,7 +180,7 @@ class MCI_Footnotes_Settings { * @var str * * @since 2.1.6 This setting removed as irrelevant since priority level settings need permanent visibility. - * @datetime 2020-12-09T2107+0100 + * @date 2020-12-09T2107+0100 */ const C_BOOL_FOOTNOTES_EXPERT_MODE = "footnote_inputfield_enable_expert_mode"; @@ -217,7 +217,7 @@ 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 - * @datetime 2020-11-11T1817+0100 + * @date 2020-11-11T1817+0100 * * @reporter @andreasra * @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566 @@ -367,7 +367,7 @@ 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. - * @datetime 2020-12-15T0520+0100 + * @date 2020-12-15T0520+0100 * @var str */ const C_STR_CUSTOM_CSS_NEW = "footnote_inputfield_custom_css_new"; @@ -376,11 +376,11 @@ class MCI_Footnotes_Settings { * Settings Container Key to enable display of legacy Custom CSS metaboxes. * * @since 2.2.2 - * @datetime 2020-12-15T0520+0100 + * @date 2020-12-15T0520+0100 * @var str * * @since 2.3.0 swap Boolean from 'migration complete' to 'show legacy' - * @datetime 2020-12-27T1233+0100 + * @date 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. @@ -438,7 +438,7 @@ class MCI_Footnotes_Settings { * - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision. * * @since 2.1.0 - * @datetime 2020-11-08T2106+0100 + * @date 2020-11-08T2106+0100 * * @reporter @rovanov * @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/ @@ -453,7 +453,7 @@ 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 - * @datetime 2020-11-16T0859+0100 + * @date 2020-11-16T0859+0100 * * @reporter @cwbayer * @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/ @@ -506,7 +506,7 @@ class MCI_Footnotes_Settings { * - Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution. * * @since 2.1.1 - * @datetime 2020-11-16T2024+0100 + * @date 2020-11-16T2024+0100 * * @contributor @spaceling * @link https://wordpress.org/support/topic/change-the-position-5/#post-13615994 @@ -519,7 +519,7 @@ class MCI_Footnotes_Settings { * Settings Container Key for 'the_content' hook priority level. * * @since 2.1.1 - * @datetime 2020-11-16T0859+0100 + * @date 2020-11-16T0859+0100 * * @var str */ @@ -529,7 +529,7 @@ class MCI_Footnotes_Settings { * Settings Container Key for '' hook priority level * * @since 2.1.2 - * @datetime 2020-11-20T0620+0100 + * @date 2020-11-20T0620+0100 * * @var str */ @@ -591,7 +591,7 @@ class MCI_Footnotes_Settings { * - Bugfix: Scroll duration: make configurable to conform to website content and style requirements. * * @since 2.1.4 - * @datetime 2020-12-05T0538+0100 + * @date 2020-12-05T0538+0100 */ // scroll offset and duration: const C_INT_FOOTNOTES_SCROLL_OFFSET = "footnotes_inputfield_scroll_offset"; @@ -848,7 +848,7 @@ class MCI_Footnotes_Settings { self::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE => '[[references]]', self::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes', - // whether to enqueue additional style sheet: + // whether to enqueue additional stylesheet: self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none', // top and bottom margins: diff --git a/class/task.php b/class/task.php index cce7041..7952722 100644 --- a/class/task.php +++ b/class/task.php @@ -7,7 +7,7 @@ * @since 1.5.0 * * - * @lastmodified 2021-02-12T1744+0100 + * @lastmodified 2021-02-16T0055+0100 * * @since 2.0.0 Bugfix: various. * @since 2.0.4 Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report. @@ -16,7 +16,7 @@ * @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.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, 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. @@ -76,7 +76,7 @@ * @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: 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 Bugfix: Reference container, tooltips: URL wrap: account for leading space in value, thanks to @karolszakiel example provision. - * @since 2.5.4 Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @@theroninjedi47 bug report. + * @since 2.5.4 Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report. * @since 2.5.4 Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error. */ @@ -148,7 +148,7 @@ 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 - * @datetime 2020-12-25T0338+0100 + * @date 2020-12-25T0338+0100 * * @reporter @justbecuz * @link https://wordpress.org/support/topic/reset-footnotes-to-1/ @@ -168,7 +168,7 @@ class MCI_Footnotes_Task { * - Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution. * * @since 2.4.0 - * @datetime 2021-01-04T1355+0100 + * @date 2021-01-04T1355+0100 * * @author Patrizia Lutz @misfist * @@ -225,14 +225,14 @@ class MCI_Footnotes_Task { * - Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers. * * @since 2.1.4 - * @datetime 2020-12-05T0538+0100 + * @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 - * @datetime 2021-01-03T2055+0100 - * @datetime 2021-01-04T0504+0100 + * @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 @@ -254,8 +254,8 @@ 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 - * @datetime 2020-11-25T1306+0100 - * @datetime 2020-11-26T1051+0100 + * @date 2020-11-25T1306+0100 + * @date 2020-11-26T1051+0100 * * @contributor @docteurfitness * @link https://wordpress.org/support/topic/update-2-1-3/#post-13704194 @@ -267,7 +267,7 @@ class MCI_Footnotes_Task { * - 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 + * @date 2020-12-30T2313+0100 * * @contributor @martinneumannat * @link https://wordpress.org/support/topic/making-it-amp-compatible/ @@ -302,7 +302,7 @@ class MCI_Footnotes_Task { * - Update: Tooltips: ability to display dedicated content before `[[/tooltip]]`, thanks to @jbj2199 issue report. * * @since 2.5.2 - * @datetime 2021-01-19T2223+0100 + * @date 2021-01-19T2223+0100 * * @reporter @jbj2199 * @link https://wordpress.org/support/topic/change-tooltip-text/ @@ -322,7 +322,7 @@ class MCI_Footnotes_Task { * - Adding: Footnote delimiters: syntax validation for balanced footnote start and end tag short codes. * * @since 2.4.0 - * @datetime 2021-01-01T0227+0100 + * @date 2021-01-01T0227+0100 * * @var bool * @@ -352,7 +352,7 @@ class MCI_Footnotes_Task { * @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: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility). - * @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.7 BUGFIX: Hooks: Default-disable 'the_post', thanks to @spaceling @markcheret @nyamachi @whichgodsaves @spiralofhope2 @mmallett @andreasra @widecast @ymorin007 @tashi1es bug reports. * @since 2.0.7 Bugfix: Set priority level back to 10 assuming it is unproblematic 2020-11-06T1344+0100. * @since 2.0.8 Bugfix: Priority level back to PHP_INT_MAX (need to get in touch with other plugins). * @since 2.1.0 UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook. @@ -369,7 +369,7 @@ class MCI_Footnotes_Task { * - 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 - * @datetime 2020-11-02T0330+0100 + * @date 2020-11-02T0330+0100 * @link https://codex.wordpress.org/Plugin_API/#Hook_in_your_Filter * * @contributor @spaceling @@ -385,7 +385,7 @@ class MCI_Footnotes_Task { * - Bugfix: Dashboard: priority level setting for the_content hook, thanks to @imeson bug report. * * @since 2.1.1 - * @datetime 2020-11-17T0254+0100 + * @date 2020-11-17T0254+0100 * * @reporter @imeson * @link https://wordpress.org/support/topic/change-the-position-5/#post-13538345 @@ -394,7 +394,7 @@ class MCI_Footnotes_Task { * - Bugfix: Dashboard: priority level settings for all other hooks, thanks to @nikelaos bug report. * * @since 2.1.2 - * @datetime 2020-11-19T1849+0100 + * @date 2020-11-19T1849+0100 * * @reporter @nikelaos * @link https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13676705 @@ -447,7 +447,7 @@ 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 - * @datetime 2021-01-05T1402+0100 + * @date 2021-01-05T1402+0100 * * @contributor @misfist * @link https://wordpress.org/support/topic/footnote-doesntwork-on-category-page/#post-13864859 @@ -467,7 +467,7 @@ class MCI_Footnotes_Task { * - Bugfix: Hooks: support footnotes in Popup Maker popups, thanks to @squatcher bug report. * * @since 2.5.1 - * @datetime 2021-01-18T2038+0100 + * @date 2021-01-18T2038+0100 * * @reporter @squatcher * @link https://wordpress.org/support/topic/footnotes-use-in-popup-maker/ @@ -502,7 +502,7 @@ class MCI_Footnotes_Task { * @accountable @pewgeuges * * - * - BUGFIX: Hooks: Default-disable 'the_post', thanks to @spaceling @@markcheret @nyamachi @whichgodsaves @spiralofhope2 @mmallett @andreasra @widecast @ymorin007 @tashi1es bug reports. + * - 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 @@ -548,7 +548,7 @@ class MCI_Footnotes_Task { * - UPDATE: Hooks: remove 'the_post', the plugin stops supporting this hook. * * @since 2.1.0 - * @datetime 2020-11-08T1839+0100 + * @date 2020-11-08T1839+0100 * @accountable @pewgeuges */ @@ -566,7 +566,7 @@ class MCI_Footnotes_Task { * * @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: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback. - * @since 2.1.3 raise settings priority to override theme style sheets + * @since 2.1.3 raise settings priority to override theme stylesheets * @since 2.1.4 Bugfix: Tooltips: Styling: fix font size issue by adding font size to settings with legacy as default. * @since 2.1.4 Bugfix: Reference container: fix layout issues by moving backlink column width to settings. * @since 2.2.5 Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report. @@ -575,7 +575,7 @@ class MCI_Footnotes_Task { * @since 2.5.4 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. */ public function wp_head() { - + // insert start tag without switching out of PHP: echo "\r\n