update 2.5.6d4 in case it is tested in the related forum topic.\nFull changelog:\n= 2.5.6 =\n- Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports.\n- Bugfix: Alternative tooltips: shrink width to short content.\n- Update: Documentation: slightly revise / update the plugin’s welcome page on WordPress.org.
git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2478015 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
d0fa3c5f97
commit
65874f089b
7 changed files with 44 additions and 15 deletions
|
@ -21,7 +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 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.6 Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it issue report.
|
||||
* @since 2.5.6 Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports.
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -189,7 +189,7 @@ class MCI_Footnotes {
|
|||
/**
|
||||
* Enqueues the jQuery library registered by WordPress.
|
||||
*
|
||||
* - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it issue report.
|
||||
* - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports.
|
||||
*
|
||||
* @since 2.5.6
|
||||
*
|
||||
|
|
|
@ -791,7 +791,7 @@ class MCI_Footnotes_Settings {
|
|||
/**
|
||||
* 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.
|
||||
* - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports.
|
||||
*
|
||||
* @since 2.5.6
|
||||
*
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
* @since 1.5.0
|
||||
*
|
||||
*
|
||||
* @lastmodified 2021-02-19T2030+0100
|
||||
* @lastmodified 2021-02-20T0438+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.
|
||||
|
@ -79,7 +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 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.6 Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it issue report.
|
||||
* @since 2.5.6 Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports.
|
||||
*/
|
||||
|
||||
// If called directly, abort:
|
||||
|
@ -828,7 +828,7 @@ class MCI_Footnotes_Task {
|
|||
* @since 2.2.5
|
||||
* @date 2020-12-18T1113+0100
|
||||
*/
|
||||
// alternative tooltips:
|
||||
// jQuery tooltips:
|
||||
if ( ! self::$a_bool_AlternativeTooltipsEnabled) {
|
||||
|
||||
// tooltip position:
|
||||
|
@ -838,13 +838,18 @@ class MCI_Footnotes_Task {
|
|||
}
|
||||
echo "}\r\n";
|
||||
|
||||
// alternative tooltips:
|
||||
} else {
|
||||
echo "}\r\n";
|
||||
|
||||
// position:
|
||||
// dimensions:
|
||||
$l_int_AlternativeTooltipWidth = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH ) );
|
||||
echo ".footnote_tooltip.position {";
|
||||
echo " width: " . intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH)) . 'px;';
|
||||
echo " width: " . $l_int_AlternativeTooltipWidth . 'px;';
|
||||
// set also as max-width wrt short tooltip shrinking:
|
||||
echo " max-width: " . $l_int_AlternativeTooltipWidth . 'px;';
|
||||
|
||||
// position:
|
||||
$l_str_AlternativePosition = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION);
|
||||
$l_int_OffsetX = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X));
|
||||
|
||||
|
@ -1650,6 +1655,21 @@ class MCI_Footnotes_Task {
|
|||
} else {
|
||||
$l_str_TooltipContent = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine shrink width if alternative tooltips are enabled.
|
||||
*
|
||||
* @since 2.5.6
|
||||
*/
|
||||
$l_str_TooltipStyle = '';
|
||||
if ( self::$a_bool_AlternativeTooltipsEnabled && self::$a_bool_TooltipsEnabled ) {
|
||||
$l_int_TooltipLength = strlen( strip_tags( $l_str_TooltipContent ) );
|
||||
if ( $l_int_TooltipLength < 70 ) {
|
||||
$l_str_TooltipStyle = ' style="width: ';
|
||||
$l_str_TooltipStyle .= ( $l_int_TooltipLength * .7 );
|
||||
$l_str_TooltipStyle .= 'em;"';
|
||||
}
|
||||
}
|
||||
|
||||
// fill in 'templates/public/footnote.html':
|
||||
$l_obj_Template->replace(
|
||||
|
@ -1664,6 +1684,7 @@ class MCI_Footnotes_Task {
|
|||
"index" => $l_int_Index,
|
||||
"after" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER),
|
||||
"anchor-element" => $l_str_ReferrerAnchorElement,
|
||||
"style" => $l_str_TooltipStyle,
|
||||
"text" => $l_str_TooltipContent,
|
||||
)
|
||||
);
|
||||
|
@ -2267,12 +2288,15 @@ class MCI_Footnotes_Task {
|
|||
/**
|
||||
* 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.
|
||||
* - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports.
|
||||
*
|
||||
* @since 2.5.6
|
||||
*
|
||||
* @reporter @hopper87it
|
||||
* @link https://wordpress.org/support/topic/footnotes-wp-rocket/
|
||||
*
|
||||
* @reporter @pkverma99
|
||||
* @link https://wordpress.org/support/topic/footnotes-wp-rocket/#post-14076188
|
||||
*/
|
||||
$l_str_ScriptMode = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE);
|
||||
|
||||
|
|
|
@ -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.6d3
|
||||
Version: 2.5.6d4
|
||||
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-19T2055+0100
|
||||
* @lastmodified 2021-02-20T0438+0100
|
||||
* @committer @pewgeuges
|
||||
*/
|
||||
define( 'C_STR_FOOTNOTES_VERSION', '2.5.6d3' );
|
||||
define( 'C_STR_FOOTNOTES_VERSION', '2.5.6d4' );
|
||||
|
||||
/*
|
||||
LICENSE NOTICE
|
||||
|
|
|
@ -78,7 +78,8 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
|
|||
== Changelog ==
|
||||
|
||||
= 2.5.6 =
|
||||
- Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it issue report.
|
||||
- Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports.
|
||||
- Bugfix: Alternative tooltips: shrink width to short content.
|
||||
- Update: Documentation: slightly revise / update the plugin’s welcome page on WordPress.org.
|
||||
|
||||
= 2.5.5 =
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
id="footnote_plugin_tooltip_text_[[post_id]]_[[container_id]]_[[note_id]]"
|
||||
class="footnote_tooltip position hidden"
|
||||
onmouseout="footnoteTooltipHide('footnote_plugin_tooltip_text_[[post_id]]_[[container_id]]_[[note_id]]')"
|
||||
[[style]]
|
||||
>[[text]]</span
|
||||
></span
|
||||
>
|
||||
|
|
|
@ -4,14 +4,17 @@
|
|||
*
|
||||
* @since 2.5.6
|
||||
* @type object
|
||||
* @lastmodified 2021-02-19T1545+0100
|
||||
* @lastmodified 2021-02-20T0252+0100
|
||||
*
|
||||
* - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it issue report.
|
||||
* - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports.
|
||||
*
|
||||
* @since 2.5.6
|
||||
*
|
||||
* @reporter @hopper87it
|
||||
* @link https://wordpress.org/support/topic/footnotes-wp-rocket/
|
||||
*
|
||||
* @reporter @pkverma99
|
||||
* @link https://wordpress.org/support/topic/footnotes-wp-rocket/#post-14076188
|
||||
*
|
||||
* The heavy jQuery Core library from WordPress must not be deferred for
|
||||
* the jQuery reference container to work, and is detrimental to page speed.
|
||||
|
|
Reference in a new issue