prepare urgent bugfix release 2.5.4 - this: 2.5.4d7

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2473867 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
pewgeuges 2021-02-12 16:22:45 +00:00
parent 0c064a7c5b
commit eaaad12e9b
7 changed files with 108 additions and 59 deletions

View file

@ -7,7 +7,7 @@
* @since 1.5.0 14.09.14 14:47
*
*
* @lastmodified 2021-02-12T1035+0100
* @lastmodified 2021-02-12T1705+0100
*
* @since 2.0.4 restore arrow settings 2020-11-01T0509+0100
* @since 2.1.0 read-on button label 2020-11-08T2148+0100
@ -616,6 +616,12 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
);
// options for superscript normalize scope:
$l_arr_NormalizeSuperscript = array(
"no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"referrers" => __("Footnote referrers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"all" => __("All superscript elements", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
);
// load template file
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-superscript");
// replace all placeholders
@ -632,6 +638,10 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"notice-link" => __("Please find this setting at the end of the reference container settings. The link element is needed to apply the themes link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-normalize" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, __("Normalize vertical alignment and font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"normalize" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT, $l_arr_NormalizeSuperscript),
"notice-normalize" => __("Most themes dont need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
)
);
// display template with replaced placeholders

View file

@ -675,7 +675,7 @@ class MCI_Footnotes_Settings {
const C_STR_HARD_LINK_IDS_SEPARATOR = "footnotes_inputfield_hard_link_ids_separator";
/**
* Settings container key for shortcode syntax validation
* Settings container key for shortcode syntax validation.
*
* @since 2.4.0
* @var str
@ -685,7 +685,7 @@ class MCI_Footnotes_Settings {
const C_BOOL_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE = "footnotes_inputfield_shortcode_syntax_validation_enable";
/**
* Settings container key to enable a backlink tooltip
* Settings container key to enable a backlink tooltip.
*
* -
*
@ -699,7 +699,7 @@ class MCI_Footnotes_Settings {
const C_BOOL_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE = "footnotes_inputfield_backlink_tooltip_enable";
/**
* Settings container key to configure the backlink tooltip
* Settings container key to configure the backlink tooltip.
*
* -
*
@ -713,7 +713,7 @@ class MCI_Footnotes_Settings {
const C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT = "footnotes_inputfield_backlink_tooltip_text";
/**
* Settings container key to configure the tooltip excerpt delimiter
* Settings container key to configure the tooltip excerpt delimiter.
*
* -
*
@ -727,7 +727,7 @@ class MCI_Footnotes_Settings {
const C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER = "footnotes_inputfield_tooltip_excerpt_delimiter";
/**
* Settings container key to enable mirroring the tooltip excerpt in the reference container
* Settings container key to enable mirroring the tooltip excerpt in the reference container.
*
* -
*
@ -741,7 +741,7 @@ class MCI_Footnotes_Settings {
const C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE = "footnotes_inputfield_tooltip_excerpt_mirror_enable";
/**
* Settings container key to configure the tooltip excerpt separator in the reference container
* Settings container key to configure the tooltip excerpt separator in the reference container.
*
* -
*
@ -754,6 +754,20 @@ class MCI_Footnotes_Settings {
*/
const C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR = "footnotes_inputfield_tooltip_excerpt_mirror_separator";
/**
* Settings container key to enable superscript style normalization.
*
* -
*
* @since 2.5.4
*
* @reporter
* @link
*
* @var str
*/
const C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT = "footnotes_inputfield_referrers_normal_superscript";
/**
* SETTINGS STORAGE
@ -924,6 +938,7 @@ class MCI_Footnotes_Settings {
self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]',
self::C_BOOL_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no',
self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ',
self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no',
// The default position should not be lateral because of the risk

View file

@ -7,7 +7,7 @@
* @since 1.5.0
*
*
* @lastmodified 2021-02-12T1100+0100
* @lastmodified 2021-02-12T1641+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.
@ -74,6 +74,7 @@
* @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: Referrers: optional fixes to vertical alignment, font size and position (static) for in-theme consistency and cross-theme stability, thanks to
* @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 Bugfix: Tooltips: fix display in Popup Maker popups by correcting a coding error.
@ -571,12 +572,37 @@ class MCI_Footnotes_Task {
* @since 2.2.5 Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report.
* @since 2.2.5 Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report.
* @since 2.3.0 Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe 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.
*/
public function wp_head() {
// insert start tag without switching out of PHP:
echo "\r\n<style type=\"text/css\" media=\"all\">\r\n";
/**
* Normalizes the referrers vertical alignment and font size.
*
* - 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
* @datetime 2021-02-12T1631+0100
*
* @reporter @tomturowski
* @link https://wordpress.org/support/topic/in-line-superscript-ref-rides-to-high/
*
* Cannot be included in external style sheet, as it is only optional.
* The scope is variable too: referrers only, or all superscript elements.
*/
$l_str_NormalizeSuperscript = MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT );
if ( $l_str_NormalizeSuperscript !== 'no' ) {
if ( $l_str_NormalizeSuperscript === 'all' ) {
echo "sup {";
} else {
echo ".footnote_plugin_tooltip_text {";
}
echo "vertical-align: super; font-size: smaller; position: static;}\r\n";
}
/**
* Reference container display on home page
*
@ -878,7 +904,7 @@ class MCI_Footnotes_Task {
* @reporter @andreasra
* @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566
*
* Alternative tooltip script: printed formatted, not minified:
* The script for alternative tooltips is printed formatted, not minified:
*/
if ( self::$a_bool_AlternativeTooltipsEnabled ) {
?>
@ -1174,7 +1200,7 @@ class MCI_Footnotes_Task {
*
*
* 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.
* prepend 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))) {

View file

@ -8,7 +8,7 @@
/* Version: 2.5.4
Last modified: 2021-02-12T1051+0100
Last modified: 2021-02-12T1709+0100
Classes recommended for Custom CSS are listed in
@ -177,9 +177,6 @@ Classes:
@since 2.1.1 Referrers: line height 0 to fix superscript, thanks to @cwbayer bug report
@see <https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/>
@since 2.5.4 Bugfix: Referrers: fix vertical alignment, font size and position (static) for cross-theme stability, thanks to @tomturowski bug report.
@link https://wordpress.org/support/topic/in-line-superscript-ref-rides-to-high/
*/
.footnote_referrer,
@ -205,9 +202,6 @@ Classes:
.footnote_plugin_tooltip_text {
line-height: 0;
vertical-align: super;
font-size: smaller;
position: static;
cursor: pointer;
}

View file

@ -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.4d6
Version: 2.5.4d7
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-12T1056+0100
* @lastmodified 2021-02-12T1707+0100
* @committer @pewgeuges
*/
define( 'C_STR_FOOTNOTES_VERSION', '2.5.4d6' );
define( 'C_STR_FOOTNOTES_VERSION', '2.5.4d7' );
/*
LICENSE NOTICE

View file

@ -79,8 +79,8 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
== Changelog ==
= 2.5.4d6 =
- Bugfix: Referrers: fix vertical alignment, font size and position (static) for cross-theme stability, thanks to @tomturowski bug report.
= 2.5.4d7 =
- 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.
- Bugfix: Reference container, tooltips: URL wrap: enable the 'word-wrap: anywhere' rule, thanks to @rebelc0de bug report.
- Bugfix: Reference container, tooltips: URL wrap: account for leading space in value, thanks to @karolszakiel example provision.
- Bugfix: Dashboard: Tooltip dimensions: move from 'Tooltip position' to a dedicated metabox, thanks to @codldmac issue report.

View file

@ -16,5 +16,9 @@
<td>[[label-link]]</td>
<td><span class="footnotes_notice">[[notice-link]]</span></td>
</tr>
<tr>
<td>[[label-normalize]]</td>
<td>[[normalize]] <span class="footnotes_notice">[[notice-normalize]]</span></td>
</tr>
</tbody>
</table>