Development 2.6.0d2 finished so far.

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2497412 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
pewgeuges 2021-03-16 22:57:27 +00:00
parent c5a9af037a
commit f089e0446a
12 changed files with 44 additions and 32 deletions

View file

@ -179,9 +179,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_Layout_Engine {
array(
'label-amp' => $this->add_label( MCI_Footnotes_Settings::C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE, __( 'Enable AMP compatibility mode:', 'footnotes' ) ),
'amp' => $this->add_checkbox( MCI_Footnotes_Settings::C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE ),
'notice-amp' => __( 'This option enables hard links with scroll offset.', 'footnotes' ),
// Translators: '%s' is the logogram of Footnotes.
'description-amp' => sprintf( __( '%s is now fully functional on AMP pages and websites in all modes including Standard mode, except animated scrolling but with scroll offset in screen height per cent as configured, styled tooltips and reference container expand/collapse.', 'footnotes' ), '<span style="font-style: normal;">' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '</span>' ),
'notice-amp' => __( 'This option enables hard links with configurable scroll offset in % window height.', 'footnotes' ),
// Translators: '%s' is the logogram of the 'Footnotes' plugin.
'description-amp' => sprintf( __( '%s becomes AMP compatible if this box is checked, but without scroll animation and fade-in/fade-out. Styled tooltips show up if enabled, and the reference container expands also on clicking a referrer if its collapsed by default.', 'footnotes' ), '<span style="font-style: normal;">' . MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME . '</span>' ),
)
);
// Display template with replaced placeholders.

View file

@ -39,7 +39,7 @@ class MCI_Footnotes {
/**
* Allows to determine whether tooltips are enabled.
* The actual value of these properties is configurable and depends on settings.
* The actual value of these properties is configurable.
*
* - Bugfix: Templates: optimize template load and processing based on settings, thanks to @misfist code contribution.
*

View file

@ -790,9 +790,6 @@ class MCI_Footnotes_Task {
/*
* Tooltips.
*/
MCI_Footnotes::$a_bool_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED ) );
MCI_Footnotes::$a_bool_alternative_tooltips_enabled = MCI_Footnotes_Convert::to_bool( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE ) );
if ( MCI_Footnotes::$a_bool_tooltips_enabled ) {
echo '.footnote_tooltip {';
@ -876,7 +873,7 @@ class MCI_Footnotes_Task {
* @since 2.2.5
* @date 2020-12-18T1113+0100
*/
if ( ! MCI_Footnotes::$a_bool_alternative_tooltips_enabled ) {
if ( ! MCI_Footnotes::$a_bool_alternative_tooltips_enabled && ! MCI_Footnotes::$a_bool_amp_enabled ) {
/*
* jQuery tooltips.
*/
@ -887,7 +884,7 @@ class MCI_Footnotes_Task {
echo "}\r\n";
} else {
/*
* Alternative tooltips.
* AMP compatible and alternative tooltips.
*/
echo "}\r\n";
@ -919,18 +916,15 @@ class MCI_Footnotes_Task {
/**
* AMP compatible and alternative tooltip timing.
*
*
* @see dev-amp-tooltips.css or dev-tooltips-alternative.css.
* For jQuery tooltip timing @see templates/public/tooltip.html.
*/
echo ' .footnote_tooltip.shown {';
$l_int_fade_in_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY ) );
$l_int_fade_in_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION ) );
$l_int_fade_in_delay = ! empty( $l_int_fade_in_delay ) ? $l_int_fade_in_delay : '0';
$l_int_fade_in_duration = ! empty( $l_int_fade_in_duration ) ? $l_int_fade_in_duration : '0';
echo ' transition-delay: ' . $l_int_fade_in_delay . 'ms;';
echo ' transition-duration: ' . $l_int_fade_in_duration . 'ms;';
echo '} .footnote_tooltip.hidden {';
if ( MCI_Footnotes::$a_bool_amp_enabled ) {
echo '} span.footnote_referrer > span.footnote_tooltip {';
} else {
echo '} .footnote_tooltip.hidden {';
}
$l_int_fade_out_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY ) );
$l_int_fade_out_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION ) );
$l_int_fade_out_delay = ! empty( $l_int_fade_out_delay ) ? $l_int_fade_out_delay : '0';
@ -939,6 +933,18 @@ class MCI_Footnotes_Task {
echo ' transition-duration: ' . $l_int_fade_out_duration . 'ms;';
echo "}\r\n";
if ( MCI_Footnotes::$a_bool_amp_enabled ) {
echo 'span.footnote_referrer:focus-within > span.footnote_tooltip, span.footnote_referrer:hover > span.footnote_tooltip {';
} else {
echo ' .footnote_tooltip.shown {';
}
$l_int_fade_in_delay = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY ) );
$l_int_fade_in_duration = intval( MCI_Footnotes_Settings::instance()->get( MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION ) );
$l_int_fade_in_delay = ! empty( $l_int_fade_in_delay ) ? $l_int_fade_in_delay : '0';
$l_int_fade_in_duration = ! empty( $l_int_fade_in_duration ) ? $l_int_fade_in_duration : '0';
echo ' transition-delay: ' . $l_int_fade_in_delay . 'ms;';
echo ' transition-duration: ' . $l_int_fade_in_duration . 'ms;';
}
}

View file

@ -4,7 +4,7 @@
*
* @since 2.5.5
* @version 2.6.0
* @lastmodified 2021-02-18T2029+0100
* @lastmodified 2021-03-16T2340+0100
*
* System of unified minified style sheets tailored to the instance.
*
@ -30,8 +30,11 @@ span.footnote_referrer > span.footnote_tooltip {
visibility:hidden;
opacity:"0";
transition-property: visibility opacity;
/*
Property values of settings are internal CSS.
transition-delay: 500ms;
transition-duration: 1s;
*/
}
span.footnote_referrer:focus-within > span.footnote_tooltip,
@ -39,8 +42,11 @@ span.footnote_referrer:hover > span.footnote_tooltip {
visibility:visible;
opacity:1;
transition-property: visibility opacity;
/*
Property values of settings are internal CSS.
transition-delay: 0;
transition-duration: 200ms;
*/
}
/**

View file

@ -39,7 +39,7 @@ fade-in parameters
transition-property: visibility opacity;
transition-timing-function: linear;
/*
property values of settings are inline CSS
Property values of settings are internal CSS.
transition-delay: 0ms;
transition-duration: 200ms;
*/

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

@ -6,8 +6,8 @@
* Created-Time: 16:21
* Since: 1.0
*
* @version 2.5.5
* @lastmodified 2021-02-18T2026+0100
* @version 2.6.0
* @lastmodified 2021-03-16T2349+0100
*/
/**

View file

@ -4,8 +4,8 @@
* 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
* Package V.: 2.6.0d1
* Version: 2.5.10
* Package V.: 2.6.0d2
* Version: 2.6.0
* CAUTION: THIS V. FIELD IS PARSED FOR UPDATE CONFIGURATION.
* Author URI: https://cheret.org/footnotes/
* Text Domain: footnotes
@ -24,9 +24,9 @@
* @since 2.1.4
* @since 2.5.3 (Hungarian)
* @var str
* @lastmodified 2021-03-15T2139+0100
* @lastmodified 2021-03-16T2345+0100
*/
define( 'C_STR_PACKAGE_VERSION', '2.6.0d1' );
define( 'C_STR_PACKAGE_VERSION', '2.6.0d2' );
/**
* Version numbers in WordPress plugin readme.txt and main PHP headers.

View file

@ -4,7 +4,7 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen
Requires at least: 3.9
Tested up to: 5.7
Requires PHP: 5.6
Package Version: 2.6.0d1
Package Version: 2.6.0d2
Version: 2.6.0
Stable Tag: 2.5.10
CAUTION: THE S. T. FIELD IS PARSED FOR RELEASE CONFIGURATION.