development update 2.5.6d2 to prepare the newly promised bugfix release adding a reference container template not using jQuery, plain JS instead.\nThe following is the changelog as drafted for this release: \n= 2.5.6 =\n- Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it issue report.\n- Update: Documentation: slightly revise / update the plugin’s welcome page on WordPress.org.

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2477898 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
pewgeuges 2021-02-19 19:42:45 +00:00
parent 7f5499723b
commit 67c1f443ad
21 changed files with 200 additions and 36 deletions

View file

@ -7,7 +7,7 @@
* @since 1.5.0 14.09.14 14:47 * @since 1.5.0 14.09.14 14:47
* *
* *
* @lastmodified 2021-02-18T2021+0100 * @lastmodified 2021-02-19T2011+0100
* *
* @since 2.0.4 restore arrow settings 2020-11-01T0509+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.0 read-on button label 2020-11-08T2148+0100
@ -233,12 +233,17 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"vw" => __("viewport width", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "vw" => __("viewport width", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
); );
// options for Yes/No select box: // options for reference container script mode:
$l_arr_Enabled = array( $l_arr_ScriptMode = array(
"yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "jquery" => __("jQuery", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) "js" => __("plain JavaScript", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
); );
// options for Yes/No select box:
$l_arr_Enabled = array(
"yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
);
// load template file // load template file
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-reference-container"); $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-reference-container");
// replace all placeholders // replace all placeholders
@ -256,6 +261,10 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"label-collapse" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, __("Collapse by default:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-collapse" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, __("Collapse by default:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"collapse" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, $l_arr_Enabled), "collapse" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, $l_arr_Enabled),
"label-script" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, __("Script mode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"script" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE, $l_arr_ScriptMode),
"notice-script" => __("The plain JavaScript mode does not support scroll animation and will enable hard links with scroll offset.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __("Default position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __("Default position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_Positions), "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_Positions),
"notice-position" => sprintf(__("To use the position shortcode, please set the position to: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '<span style="font-style: normal;">' . __("at the end of the post", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . '</span>'), "notice-position" => sprintf(__("To use the position shortcode, please set the position to: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '<span style="font-style: normal;">' . __("at the end of the post", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . '</span>'),

View file

@ -7,7 +7,7 @@
* @since 1.5.0 12.09.14 10:56 * @since 1.5.0 12.09.14 10:56
* *
* *
* @lastmodified 2021-02-18T2023+0100 * @lastmodified 2021-02-19T2031+0100
* *
* @since 1.6.5 Bugfix: Improve widgets registration, thanks to @felipelavinz code contribution. * @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. * @since 1.6.5 Update: Fix for deprecated PHP function create_function(), thanks to @psykonevro @daliasued bug reports, thanks to @felipelavinz code contribution.
@ -21,6 +21,7 @@
* @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 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: 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. * @since 2.5.5 Bugfix: Libraries: optimize processes by loading external and internal scripts only if needed, thanks to @docteurfitness issue report.
* @since 2.5.6 Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it issue report.
*/ */
/** /**
@ -180,18 +181,31 @@ class MCI_Footnotes {
* *
* The condition about tooltips was missing, only the not-alternative-tooltips part was present. * The condition about tooltips was missing, only the not-alternative-tooltips part was present.
*/ */
// 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 ) );
$l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE);
/** /**
* Enqueues the jQuery library registered by WordPress. * Enqueues the jQuery library registered by WordPress.
* *
* jQuery is also used for animated scrolling, so it should be loaded by default. * - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it issue report.
*
* @since 2.5.6
*
* @reporter @hopper87it
* @link https://wordpress.org/support/topic/footnotes-wp-rocket/
*
* jQuery is also used for animated scrolling, so it was loaded by default.
* The function wp_enqueue_script() avoids loading the same library multiple times. * The function wp_enqueue_script() avoids loading the same library multiple times.
* After adding the alternative reference container, jQuery has become optional,
* but still enabled by default.
*/ */
wp_enqueue_script( 'jquery' ); if ( $l_str_ScriptMode == 'jquery' || ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) ) {
// set conditions re-used for stylesheet enqueuing: wp_enqueue_script( 'jquery' );
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 ) ); }
if ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) { if ( self::$a_bool_TooltipsEnabled && ! self::$a_bool_AlternativeTooltipsEnabled ) {

View file

@ -7,7 +7,7 @@
* @since 1.5.0 14.09.14 10:43 * @since 1.5.0 14.09.14 10:43
* *
* *
* @lastmodified 2021-02-18T2024+0100 * @lastmodified 2021-02-19T1608+0100
* *
* @since 2.0.4 restore arrow settings 2020-11-02T2115+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.0.7 remove hook the_post 2020-11-06T1342+0100
@ -788,6 +788,20 @@ class MCI_Footnotes_Settings {
*/ */
const C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT = "footnotes_inputfield_referrers_normal_superscript"; const C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT = "footnotes_inputfield_referrers_normal_superscript";
/**
* Settings container key to select the script mode for the reference container.
*
* - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it issue report.
*
* @since 2.5.6
*
* @reporter @hopper87it
* @link https://wordpress.org/support/topic/footnotes-wp-rocket/
*
* @var str
*/
const C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE = "footnotes_inputfield_reference_container_script_mode";
/** /**
* SETTINGS STORAGE * SETTINGS STORAGE
@ -863,6 +877,7 @@ class MCI_Footnotes_Settings {
self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p', self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p',
self::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes', self::C_BOOL_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes',
self::C_BOOL_REFERENCE_CONTAINER_COLLAPSE => 'no', self::C_BOOL_REFERENCE_CONTAINER_COLLAPSE => 'no',
self::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE => 'jquery',
self::C_STR_REFERENCE_CONTAINER_POSITION => 'post_end', self::C_STR_REFERENCE_CONTAINER_POSITION => 'post_end',
self::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE => '[[references]]', self::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE => '[[references]]',

View file

@ -7,7 +7,7 @@
* @since 1.5.0 * @since 1.5.0
* *
* *
* @lastmodified 2021-02-18T2023+0100 * @lastmodified 2021-02-19T2030+0100
* *
* @since 2.0.0 Bugfix: various. * @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. * @since 2.0.4 Bugfix: Referrers and backlinks: remove hard links to streamline browsing history, thanks to @theroninjedi47 bug report.
@ -79,6 +79,7 @@
* @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. * @since 2.5.4 Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error.
* @since 2.5.5 Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution. * @since 2.5.5 Bugfix: Process: fix numbering bug impacting footnote #2 with footnote #1 close to start, thanks to @rumperuu bug report, thanks to @lolzim code contribution.
* @since 2.5.6 Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it issue report.
*/ */
// If called directly, abort: // If called directly, abort:
@ -213,6 +214,7 @@ class MCI_Footnotes_Task {
* *
* The official AMP plugin strips off JavaScript, breaking Footnotes * The official AMP plugin strips off JavaScript, breaking Footnotes
* animated scrolling. * animated scrolling.
* When the alternative reference container is enabled, hard links are too.
*/ */
public static $a_bool_HardLinksEnable = false; public static $a_bool_HardLinksEnable = false;
public static $a_str_ReferrerLinkSlug = 'r'; public static $a_str_ReferrerLinkSlug = 'r';
@ -728,8 +730,17 @@ class MCI_Footnotes_Task {
* - Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers. * - Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers.
* *
* @since 2.1.4 * @since 2.1.4
*
* @since 2.5.6 hard links are always enabled when the alternative reference container is.
*/ */
self::$a_bool_HardLinksEnable = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE)); self::$a_bool_HardLinksEnable = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_HARD_LINKS_ENABLE));
// correct hard links enabled status depending on alternative reference container enabled status:
$l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE);
if ( $l_str_ScriptMode != 'jquery' ) {
self::$a_bool_HardLinksEnable = true;
}
self::$a_int_ScrollOffset = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET)); self::$a_int_ScrollOffset = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET));
if (self::$a_bool_HardLinksEnable) { if (self::$a_bool_HardLinksEnable) {
echo ".footnote_referrer_anchor, .footnote_item_anchor {bottom: "; echo ".footnote_referrer_anchor, .footnote_item_anchor {bottom: ";
@ -2253,8 +2264,29 @@ class MCI_Footnotes_Task {
*/ */
$l_str_ReferenceContainerLabel = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME); $l_str_ReferenceContainerLabel = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME);
// load 'templates/public/reference-container.html': /**
$l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container"); * Select the reference container template according to the script mode.
*
* - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it issue report.
*
* @since 2.5.6
*
* @reporter @hopper87it
* @link https://wordpress.org/support/topic/footnotes-wp-rocket/
*/
$l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE);
if ( $l_str_ScriptMode == 'jquery' ) {
// load 'templates/public/reference-container.html':
$l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container");
} else {
// load 'templates/public/js-reference-container.html':
$l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "js-reference-container");
}
$l_obj_TemplateContainer->replace( $l_obj_TemplateContainer->replace(
array( array(
"post_id" => self::$a_int_PostId, "post_id" => self::$a_int_PostId,

View file

@ -6,8 +6,8 @@
* Created-Time: 16:21 * Created-Time: 16:21
* Since: 1.0 * Since: 1.0
* *
* @version 2.5.5 * @version 2.5.6
* @lastmodified 2021-02-18T2026+0100 * @lastmodified 2021-02-19T1523+0100
* *
* Classes recommended for Custom CSS: * Classes recommended for Custom CSS:
* @see templates/dashboard/customize-css-new.html * @see templates/dashboard/customize-css-new.html
@ -384,8 +384,9 @@ label
vertical-align: middle; vertical-align: middle;
} }
.footnote_container_prepare > p > span:first-child { .footnote_container_prepare > p > span:first-child,
text-align: left !important; .footnote_container_prepare > p > span:nth-child(3) {
text-align: start !important;
font-size: 1.5em !important; font-size: 1.5em !important;
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
.footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:left!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child{text-align:left!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:left!important;vertical-align:top!important;padding:5px 6px 10px 0!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a} .footnotes_validation_error{border:4px solid red;padding:20px 40px;margin:20px 0;background:#ff000055;text-align:start}.footnotes_validation_error p:first-child{font-size:20px;font-weight:700;text-align:center}.footnotes_validation_error p:nth-child(2){font-size:16px;font-style:italic}.footnotes_validation_error p:nth-child(3){font-size:14px;font-weight:700}.footnotes_validation_error p:last-child{font-size:12px}.footnote_url_wrap{word-wrap:anywhere;overflow-wrap:anywhere;word-break:break-all}.footnote_item_base,.footnote_referrer_base{position:absolute}.footnote_item_anchor,.footnote_referrer_anchor{position:relative}.footnote_plugin_tooltip_text,.footnote_plugin_tooltip_text:hover,.footnote_referrer,.footnote_referrer:hover,.footnote_referrer:link,.footnote_referrer>a,.footnote_referrer>a:hover,.footnote_referrer>a:link,.main-content .footnote_plugin_tooltip_text,.main-content .footnote_plugin_tooltip_text:hover,.main-content .footnote_referrer,.main-content .footnote_referrer:hover,.main-content .footnote_referrer:link,.main-content .footnote_referrer>a,.main-content .footnote_referrer>a:hover,.main-content .footnote_referrer>a:link{text-decoration:none!important;border-bottom:none!important;box-shadow:none!important}.footnote_plugin_tooltip_text{line-height:0;position:relative!important;cursor:pointer}.footnote_tooltip{display:none;z-index:2147483647!important;cursor:auto;text-align:left;padding:12px;line-height:1.2;font-weight:400;font-style:normal}.footnote_referrer.relative{position:relative}.footnote_tooltip.position{display:unset;position:absolute;bottom:24px;left:-50px;width:400px}.footnote_tooltip.shown{visibility:visible;opacity:1;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip.hidden{visibility:hidden;opacity:0;transition-property:visibility opacity;transition-timing-function:linear}.footnote_tooltip_continue{font-style:italic;color:green;text-decoration:none!important;cursor:pointer;white-space:nowrap}.footnote_tooltip_continue:hover{color:#00f;text-decoration:underline!important}.footnotes_reference_container{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.footnote_container_prepare{display:block!important;padding-top:24px!important}.footnote_container_prepare>p{line-height:1.3!important;margin-top:1em!important;margin-bottom:.25em!important;padding:0!important;font-weight:400!important;display:block!important;-webkit-margin-before:.83em!important;-webkit-margin-after:.83em!important;-webkit-margin-start:0!important;-webkit-margin-end:0!important;text-align:left!important;vertical-align:middle}.footnote_container_prepare>p>span:first-child,.footnote_container_prepare>p>span:nth-child(3){text-align:start!important;font-size:1.5em!important}.footnote_reference_container_collapse_button{cursor:pointer;padding:0 .5em;font-size:1.3em!important;vertical-align:2px;text-decoration:none!important}h2>.footnote_reference_container_collapse_button,h3>.footnote_reference_container_collapse_button,h4>.footnote_reference_container_collapse_button,h5>.footnote_reference_container_collapse_button,h6>.footnote_reference_container_collapse_button{font-size:inherit!important}.footnote_container_prepare>p>span:last-child a,.footnote_reference_container_collapse_button a{text-decoration:none!important}.footnote-reference-container,.footnotes_table{width:100%;border:none}.footnote_plugin_index,.footnote_plugin_index_combi,.footnote_plugin_symbol,.footnote_plugin_text{border:none!important;text-align:left!important;vertical-align:top!important;padding:5px 6px 10px 0!important}.footnote_backlink,.footnote_backlink:link,.footnote_plugin_link,.footnote_plugin_link:link,.main-content .footnote_backlink,.main-content .footnote_backlink:link,.main-content .footnote_plugin_link,.main-content .footnote_plugin_link:link{text-decoration:none!important;border-bottom:none!important}.footnote_backlink,.footnote_plugin_link{white-space:nowrap}.footnote_backlink,.footnote_index,.pointer{cursor:pointer}.footnote_backlink:hover,.footnote_plugin_link:hover,.footnote_plugin_text a:hover{text-decoration:unset;text-decoration:underline}.footnote_plugin_text{width:unset}.footnote_plugin_index,.footnote_plugin_index_combi{max-width:100px;width:2.5em}@media only screen and (max-width:768px){.footnote_plugin_index,.footnote_plugin_index_combi{max-width:80px}}.footnotes_reference_container{page-break-inside:avoid}@media print{.footnote_index_arrow,.footnote_reference_container_collapse_button,.footnote_tooltip{display:none}.footnote_plugin_tooltip_text{color:inherit}.footnote_plugin_index a,.footnote_plugin_index_combi a{color:inherit;text-decoration:none!important}div.post-meta-edit-link-wrapper{display:none}}.footnotes_logo,.footnotes_logo:hover{text-decoration:none;font-weight:400}.footnotes_logo_part1{color:#2bb975}.footnotes_logo_part2{color:#545f5a}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -4,7 +4,7 @@
Plugin URI: https://wordpress.org/plugins/footnotes/ 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. 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 Author: Mark Cheret
Version: 2.5.6d1 Version: 2.5.6d2
Author URI: http://cheret.de/plugins/footnotes-2/ Author URI: http://cheret.de/plugins/footnotes-2/
Text Domain: footnotes Text Domain: footnotes
Domain Path: /languages Domain Path: /languages
@ -18,10 +18,10 @@
* @since 2.1.4 * @since 2.1.4
* @since 2.5.3 (Hungarian) * @since 2.5.3 (Hungarian)
* @var str * @var str
* @lastmodified 2021-02-18T2048+0100 * @lastmodified 2021-02-19T2032+0100
* @committer @pewgeuges * @committer @pewgeuges
*/ */
define( 'C_STR_FOOTNOTES_VERSION', '2.5.6d1' ); define( 'C_STR_FOOTNOTES_VERSION', '2.5.6d2' );
/* /*
LICENSE NOTICE LICENSE NOTICE

View file

@ -77,6 +77,10 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
== Changelog == == Changelog ==
= 2.5.6 =
- Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it issue report.
- Update: Documentation: slightly revise / update the plugins welcome page on WordPress.org.
= 2.5.5 = = 2.5.5 =
- Update: Stylesheets: increase speed and energy efficiency by tailoring stylesheets to the needs of the instance, thanks to @docteurfitness design contribution. - 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. - Bugfix: Stylesheets: minify to shrink the carbon footprint, increase speed and implement best practice, thanks to @docteurfitness issue report.

View file

@ -16,6 +16,10 @@
<td>[[label-collapse]]</td> <td>[[label-collapse]]</td>
<td>[[collapse]]</td> <td>[[collapse]]</td>
</tr> </tr>
<tr>
<td>[[label-script]]</td>
<td>[[script]] <span class="footnotes_notice">[[notice-script]]</span></td>
</tr>
<tr> <tr>
<td>[[label-position]]</td> <td>[[label-position]]</td>
<td>[[position]] <span class="footnotes_notice">[[notice-position]]</span></td> <td>[[position]] <span class="footnotes_notice">[[notice-position]]</span></td>

View file

@ -0,0 +1,85 @@
<!--<?php//for docblock, @see MCI_Footnotes_Template::process_template()
/**
* Plain JavaScript reference container start and end without scroll script.
*
* @since 2.5.6
* @type object
* @lastmodified 2021-02-19T1545+0100
*
* - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it issue report.
*
* @since 2.5.6
*
* @reporter @hopper87it
* @link https://wordpress.org/support/topic/footnotes-wp-rocket/
*
* The heavy jQuery Core library from WordPress must not be deferred for
* the jQuery reference container to work, and is detrimental to page speed.
* This alternative works with plain JS but does not support scroll animation.
* The plugin is set to enable hard links when this option is enabled.
*/?>
-->
<div
class="speaker-mute footnotes_reference_container"
>
<div
class="footnote_container_prepare"
><[[element]]
><span
id="footnotes_container_label_expand_[[post_id]]_[[container_id]]"
class="footnote_reference_container_label pointer"
onclick="footnote_expand_reference_container_[[post_id]]_[[container_id]]();"
>[[name]]</span
><span
id="footnotes_container_button_plus_[[post_id]]_[[container_id]]"
class="footnote_reference_container_collapse_button"
style="[[button-style]]"
onclick="footnote_expand_reference_container_[[post_id]]_[[container_id]]();"
>[+]</span
><span
id="footnotes_container_label_collapse_[[post_id]]_[[container_id]]"
class="footnote_reference_container_label pointer"
style="display: none;"
onclick="footnote_collapse_reference_container_[[post_id]]_[[container_id]]();"
>[[name]]</span
><span
id="footnotes_container_button_minus_[[post_id]]_[[container_id]]"
class="footnote_reference_container_collapse_button"
style="display: none;"
onclick="footnote_collapse_reference_container_[[post_id]]_[[container_id]]();"
>[]</span
></[[element]]
></div
>
<div
id="footnote_references_container_[[post_id]]_[[container_id]]"
style="[[style]]"
>
<table
class="footnotes_table footnote-reference-container"
>
<tbody>
[[content]]
</tbody>
</table>
</div>
</div>
<script type="text/javascript">
function footnote_expand_reference_container_[[post_id]]_[[container_id]]() {
document.getElementById('footnote_references_container_[[post_id]]_[[container_id]]').style.display = "inline";
document.getElementById('footnotes_container_label_expand_[[post_id]]_[[container_id]]').style.display = "none";
document.getElementById('footnotes_container_label_collapse_[[post_id]]_[[container_id]]').style.display = "inline";
document.getElementById('footnotes_container_button_plus_[[post_id]]_[[container_id]]').style.display = "none";
document.getElementById('footnotes_container_button_minus_[[post_id]]_[[container_id]]').style.display = "inline";
}
function footnote_collapse_reference_container_[[post_id]]_[[container_id]]() {
document.getElementById('footnote_references_container_[[post_id]]_[[container_id]]').style.display = "none";
document.getElementById('footnotes_container_label_collapse_[[post_id]]_[[container_id]]').style.display = "none";
document.getElementById('footnotes_container_label_expand_[[post_id]]_[[container_id]]').style.display = "inline";
document.getElementById('footnotes_container_button_minus_[[post_id]]_[[container_id]]').style.display = "none";
document.getElementById('footnotes_container_button_plus_[[post_id]]_[[container_id]]').style.display = "inline";
}
function footnote_moveToAnchor_[[post_id]]_[[container_id]](p_str_TargetID) {
footnote_expand_reference_container_[[post_id]]_[[container_id]]();
}
</script>