From d7b36e27e9ac3b7677664237d20a5cef11ea05d5 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Thu, 5 Nov 2020 18:00:18 +0000 Subject: [PATCH 01/27] =?UTF-8?q?Releasing=20v2.0.6=20only=20obvious=20and?= =?UTF-8?q?=20direly=20needed=20edits=20cannot=20wait=20with=20respect=20t?= =?UTF-8?q?o=20users,=20cannot=20keep=20responding=20to=20users=20without?= =?UTF-8?q?=20providing=20this.=20May=20we=20please=20do=20the=20more=20ex?= =?UTF-8?q?tensive=20testing=20when=20bigger=20edits=20are=20at=20stake.?= =?UTF-8?q?=20Thank=20you.=20=E2=80=94=20For=20consistency,=20tags/2.0.5?= =?UTF-8?q?=20is=20included=20as-is=20because=20it=20was=20actually=20deli?= =?UTF-8?q?vered=20to=20our=20users=20only=20because=20the=20readme.txt=20?= =?UTF-8?q?was=20up-to-date=20too=20soon.=20So,=20that=20code=20is=20actua?= =?UTF-8?q?lly=20still=20on=20part=20of=20our=20users=20machines=20and=20I?= =?UTF-8?q?=20cannot=20hide=20away=20the=20priority=20level=20changes.=20S?= =?UTF-8?q?ee=20Changelog=20section.=20Sorry=20for=20that!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2413455 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/init.php | 4 +-- class/task.php | 17 +++++++---- css/public.css | 14 +++++---- footnotes.php | 2 +- languages/en_GB.mo | Bin 9608 -> 9608 bytes languages/en_GB.po | 4 +-- languages/en_US.mo | Bin 9600 -> 9600 bytes languages/en_US.po | 4 +-- readme.txt | 28 +++++++++++------- .../public/reference-container-body.html | 7 ++--- 10 files changed, 46 insertions(+), 34 deletions(-) diff --git a/class/init.php b/class/init.php index cd8242c..2db91e6 100644 --- a/class/init.php +++ b/class/init.php @@ -12,7 +12,7 @@ * Edited for v2.0.3: Added style sheet versioning 2020-10-29T1413+0100 * Edited for v2.0.4: Added jQuery UI from WordPress 2020-11-01T1902+0100 * - * Last modified: 2020-11-05T0638+0100 + * Last modified: 2020-11-05T1824+0100 */ @@ -126,6 +126,6 @@ class MCI_Footnotes { wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__)); // IMPORTANT: up-to-date plugin version number for cache busting. - wp_enqueue_style('mci-footnotes-css-public', plugins_url('../css/public.css', __FILE__), '', '2.0.5rc1'); + wp_enqueue_style('mci-footnotes-css-public', plugins_url('../css/public.css', __FILE__), '', '2.0.6'); } } diff --git a/class/task.php b/class/task.php index 5586204..fa9d12c 100644 --- a/class/task.php +++ b/class/task.php @@ -488,9 +488,14 @@ class MCI_Footnotes_Task { if (empty($l_str_FootnoteText)) { continue; } - // get footnote index - $l_str_FirstFootnoteIndex = ($l_str_Index + 1); - $l_str_FootnoteIndex = MCI_Footnotes_Convert::Index(($l_str_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + // generate content of footnote index cell + $l_str_FirstFootnoteIndex = ($l_str_Index + 1); + // wrap each index # in a white-space:nowrap span + $l_str_FootnoteIndex = ''; + // wrap the arrow in a @media print { display:hidden } span + $l_str_FootnoteIndex .= '' . $l_str_Arrow . ' '; + // get the index + $l_str_FootnoteIndex .= MCI_Footnotes_Convert::Index(($l_str_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); // check if it isn't the last footnote in the array if ($l_str_FirstFootnoteIndex < count(self::$a_arr_Footnotes) && MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { @@ -501,16 +506,18 @@ class MCI_Footnotes_Task { // set the further footnote as empty so it won't be displayed later self::$a_arr_Footnotes[$l_str_CheckIndex] = ""; // add the footnote index to the actual index - $l_str_FootnoteIndex .= ", " . MCI_Footnotes_Convert::Index(($l_str_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + $l_str_FootnoteIndex .= ', ' . MCI_Footnotes_Convert::Index(($l_str_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); } } } + + $l_str_FootnoteIndex .= ''; + // replace all placeholders in the template templates/public/reference-container-body.html $l_obj_Template->replace( array( "post_id" => $l_int_PostID, "id" => MCI_Footnotes_Convert::Index($l_str_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)), - "arrow" => $l_str_Arrow, "index" => $l_str_FootnoteIndex, "text" => $l_str_FootnoteText ) diff --git a/css/public.css b/css/public.css index 64c0ff8..8e89433 100755 --- a/css/public.css +++ b/css/public.css @@ -6,7 +6,7 @@ * Since: 1.0 * Version: 2.0.6 * - * Last modified: 2020-11-04T2131+0100 + * Last modified: 2020-11-05T1826+0100 */ @@ -127,7 +127,7 @@ span.footnote_tooltip { border:none !important; text-align: left !important; vertical-align: top !important; - padding: 10px 5px 5px 0 !important; + padding: 10px 6px 5px 0 !important; } .footnote_plugin_index a, .footnote_plugin_text a { @@ -138,17 +138,19 @@ span.footnote_tooltip { text-decoration: underline !important; } .footnote_plugin_index { - cursor: pointer; + cursor: pointer; overflow-wrap: unset; word-wrap: unset; word-wrap: normal !important; word-break: unset; word-break: keep-all !important; max-width: 140px; - width: 1px; /*auto-extending column to fit widest*/ - white-space: nowrap; + width: 2em; /*auto-extending column to fit widest*/ overflow: hidden; } +.footnote_index_item { + white-space: nowrap; +} .footnote_plugin_text { width: unset; /*unset width of text column to fix site issues*/ } @@ -175,7 +177,7 @@ span.footnote_tooltip { @media print { .footnote_tooltip, .footnote_reference_container_collapse_button, - .footnote_plugin_index_arrow { + .footnote_index_arrow { display: none; } .footnote_plugin_tooltip_text { diff --git a/footnotes.php b/footnotes.php index a3f4c54..28e7152 100755 --- a/footnotes.php +++ b/footnotes.php @@ -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.0.4 + Version: 2.0.6 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages diff --git a/languages/en_GB.mo b/languages/en_GB.mo index 14ad81398048c222bc5f6efeae3740939ce7ce41..d9c8f634d7393d2bf172aba1621e57cef2fe4303 100755 GIT binary patch delta 28 kcmeD1?(p8QRgBFv#L(ElZ1Zlhr##I0#U+~;D?eof0G8Vdr~m)} delta 28 kcmeD1?(p8QRgBFf#K_RpX!CBdr##Gw>8YC+D?eof0F|u@egFUf diff --git a/languages/en_GB.po b/languages/en_GB.po index 7a257c3..b29988b 100755 --- a/languages/en_GB.po +++ b/languages/en_GB.po @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: footnotes\n" "Report-Msgid-Bugs-To: http://wordpress.org/tag/footnotes\n" "POT-Creation-Date: 2014-10-18 20:58+0100\n" -"PO-Revision-Date: 2020-11-04T2152+0100\n" +"PO-Revision-Date: 2020-11-05T1306+0100\n" "Last-Translator: @pewgeuges\n" "Language-Team: SHE \n" "Language: en_GB\n" @@ -168,7 +168,7 @@ msgstr "in the footer" #: class/dashboard/subpage-main.php:113 msgid "at the end of the post" -msgstr "at the end of the page" +msgstr "at the end of the post" #: class/dashboard/subpage-main.php:114 msgid "in the widget area" diff --git a/languages/en_US.mo b/languages/en_US.mo index bdadec49319d9ea0bb300f9c21689e73379c4675..d7ff42d3b2ad2d03e694391753e5392a61499e60 100644 GIT binary patch delta 28 kcmZqhZt&i)RgBFv#L(EleDiLxyFASK#U-0(D?eof0F=TCi2wiq delta 28 kcmZqhZt&i)RgBFf#K_Rpc=K+tyFAQ^>8YD%D?eof0F#soUjP6A diff --git a/languages/en_US.po b/languages/en_US.po index 8c26f64..29643cd 100755 --- a/languages/en_US.po +++ b/languages/en_US.po @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: footnotes\n" "Report-Msgid-Bugs-To: http://wordpress.org/tag/footnotes\n" "POT-Creation-Date: 2014-10-18 20:59+0100\n" -"PO-Revision-Date: 2020-11-04T2153+0100\n" +"PO-Revision-Date: 2020-11-05T1307+0100\n" "Last-Translator: @pewgeuges\n" "Language-Team: SHE \n" "Language: en_US\n" @@ -168,7 +168,7 @@ msgstr "in the footer" #: class/dashboard/subpage-main.php:113 msgid "at the end of the post" -msgstr "at the end of the page" +msgstr "at the end of the post" #: class/dashboard/subpage-main.php:114 msgid "in the widget area" diff --git a/readme.txt b/readme.txt index 2a07fa2..92ac6b7 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen Requires at least: 3.9 Tested up to: 5.5 Requires PHP: 5.6 -Stable Tag: 2.0.4 +Stable Tag: 2.0.6 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -82,19 +82,25 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == -= 2.0.5rc1 = -- Update: Autoload / infinite scroll support added thanks to @docteurfitness -- Bugfix: Settings style sheet unenqueued to fix input boxes on public pages (enqueued for 2.0.4) -- Bugfix: Public style sheet: Footnote referrers: deleted vertical align tweaks for cross-theme and user agent compatibility -- Bugfix: Public style sheet: Reference container: auto-extending column to fit widest, to fix display with short note texts -- Bugfix: Public style sheet: Reference container: IDs: slightly increased left padding += 2.0.6 = +- Update: Autoload / infinite scroll support thanks to @docteurfitness +- Bugfix: Layout: Footnote referrers: deleted vertical align tweaks for cross-theme and user agent compatibility +- Bugfix: Layout: Reference container: fixed line break behavior in footnote # clusters +- Bugfix: Layout: Reference container: auto-extending column to fit widest, to fix display with short note texts +- Bugfix: Layout: Reference container: IDs: slightly increased left padding +- Bugfix: Translations: fixed spelling error and erroneously changed word in en_GB and en_US +- Update: Typesetting: discarded the dot after footnote numbers as not localizable (should be optional) +- Bugfix: UI: Reference container: Collapse button fully clickable, not sign only +- Bugfix: UI: Reference container: Collapse button 'collapse' with minus sign not hyphen-minus +- Update: UX: Tooltip: set display predelay to 0 for responsiveness (was 800 since 2.0.0, 400 before) +- BUGFIX: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility) + += 2.0.5 = +- Bugfix: Get references container close to content, not below all other features, by priority level 10 - Bugfix: Public style sheet: Reference container: unset width of text column to fix site issues - Update: Enable all hooks by default to prevent footnotes from seeming broken in post titles - Bugfix: Restore cursor shape pointer over 'Continue reading' button after hyperlink removal -- Update: Tooltip infobox: set display predelay to 0 for responsiveness (was 800 since 2.0.0, 400 before) -- Bugfix: Reference container: collapse button fully clickable, not sign only -- Bugfix: Reference container: collapse button 'collapse' with minus sign not hyphen-minus -- Bugfix: Translations: Spelling error in en_GB and en_US +- Bugfix: Settings style sheet unenqueued to fix input boxes on public pages (enqueued for 2.0.4) = 2.0.4 = - Update: Restored arrow settings to customize or disable the now prepended arrow symbol diff --git a/templates/public/reference-container-body.html b/templates/public/reference-container-body.html index b47e714..8af0475 100755 --- a/templates/public/reference-container-body.html +++ b/templates/public/reference-container-body.html @@ -1,13 +1,10 @@ [[arrow]] [[index]].[[index]] Date: Thu, 5 Nov 2020 18:11:57 +0000 Subject: [PATCH 02/27] edit git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2413472 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 92ac6b7..f8221c3 100755 --- a/readme.txt +++ b/readme.txt @@ -10,7 +10,7 @@ License URI: http://www.gnu.org/licenses/gpl-3.0.html == Description == -**footnotes** is now continually improved. Please feel free to check our current release candidate v2.0.5rc1, available at the bottom of the [Advanced view](https://wordpress.org/plugins/footnotes/advanced/). +**footnotes** is now continually improved. Please feel free to check our current release candidate available at the bottom of the [Advanced view](https://wordpress.org/plugins/footnotes/advanced/). Featured on wpmudev: http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/ Cheers for the review, folks! From 4f2e8ed5c9a0d3d56d5c86c42dc4bc3aafece697 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Thu, 5 Nov 2020 21:12:20 +0000 Subject: [PATCH 03/27] Schluss damit git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2413554 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- readme.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/readme.txt b/readme.txt index f8221c3..56cf767 100755 --- a/readme.txt +++ b/readme.txt @@ -4,14 +4,12 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen Requires at least: 3.9 Tested up to: 5.5 Requires PHP: 5.6 -Stable Tag: 2.0.6 +Stable Tag: 2.0.4 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html == Description == -**footnotes** is now continually improved. Please feel free to check our current release candidate available at the bottom of the [Advanced view](https://wordpress.org/plugins/footnotes/advanced/). - Featured on wpmudev: http://premium.wpmudev.org/blog/12-surprisingly-useful-wordpress-plugins-you-dont-know-about/ Cheers for the review, folks! From 0fb5e205c3ffb6805c69d8f497b8c041235fae2e Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Fri, 6 Nov 2020 04:04:30 +0000 Subject: [PATCH 04/27] =?UTF-8?q?delta=200=20for=20next=20release:=20v2.0.?= =?UTF-8?q?7d0=20commit=20as=20dev=20version=20needed=20to=20respond=20on?= =?UTF-8?q?=20forum.=20(v2.0.6=20has=20been=20diffed=20against=202.0.4=20a?= =?UTF-8?q?nd=20assessed,=20could=20be=20kept=20in=20production=20as=20wel?= =?UTF-8?q?l=20given=202.0.4=20is=20okay.)=20Hooks=20default=20status=20re?= =?UTF-8?q?set=20to=20previous,=20in=20case=20that=20matters=20(doesn?= =?UTF-8?q?=E2=80=99t=20on=20my=20WordPress).=20PROBLEM=20WITH=20UNRESPONS?= =?UTF-8?q?IVE=20POSITION=20SETTING=20UNRESOLVED?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2413678 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/init.php | 14 ++-- class/settings.php | 71 +++++++++++++------ class/task.php | 29 ++++---- css/public.css | 4 +- readme.txt | 4 ++ templates/NOTE-FOR-WEBMASTERS.txt | 28 ++++++++ .../public/reference-container-body.html | 2 +- 7 files changed, 113 insertions(+), 39 deletions(-) create mode 100644 templates/NOTE-FOR-WEBMASTERS.txt diff --git a/class/init.php b/class/init.php index 2db91e6..9e09b93 100644 --- a/class/init.php +++ b/class/init.php @@ -12,7 +12,7 @@ * Edited for v2.0.3: Added style sheet versioning 2020-10-29T1413+0100 * Edited for v2.0.4: Added jQuery UI from WordPress 2020-11-01T1902+0100 * - * Last modified: 2020-11-05T1824+0100 + * Last modified: 2020-11-06T0324+0100 */ @@ -125,7 +125,13 @@ class MCI_Footnotes { // Add jQuery tools: wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__)); - // IMPORTANT: up-to-date plugin version number for cache busting. - wp_enqueue_style('mci-footnotes-css-public', plugins_url('../css/public.css', __FILE__), '', '2.0.6'); - } + // IMPORTANT: up-to-date plugin version number for cache busting: + wp_enqueue_style( + 'mci-footnotes-css-public', + plugins_url('../css/public.css', __FILE__), + '', + '2.0.7d0' + ); + } + } diff --git a/class/settings.php b/class/settings.php index ec2e764..24302ef 100644 --- a/class/settings.php +++ b/class/settings.php @@ -6,13 +6,15 @@ * @author Stefan Herndler * @since 1.5.0 14.09.14 10:43 * - * Edited for v2.0.4 2020-11-02T2115+0100 + * Edited for: + * v2.0.4 2020-11-02T2115+0100 + * v2.0.7 2020-11-06T0321+0100 */ /** * The class loads all Settings from each WordPress Settings container. - * It a Setting is not defined yet the default value will be used. + * It a Setting is not defined yet, the default value will be used. * Each Setting will be validated and sanitized when loaded from the container. * * @author Stefan Herndler @@ -165,7 +167,7 @@ class MCI_Footnotes_Settings { const C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED = "footnote_inputfield_custom_mouse_over_box_excerpt_enabled"; /** - * Settings Container Key for the mouse-over box to define the max. length of the enabled expert. + * Settings Container Key for the mouse-over box to define the max. length of the enabled excerpt. * * @author Stefan Herndler * @since 1.5.4 @@ -388,34 +390,63 @@ class MCI_Footnotes_Settings { self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'no' ), "footnotes_storage_custom" => array( - self::C_STR_FOOTNOTES_STYLING_BEFORE => '', - self::C_STR_FOOTNOTES_STYLING_AFTER => ')', - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'no', - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 150, - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top right', - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 10, - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => 10, - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#fff7a7', + + // The default footnote referrer surroundings should be square brackets: + // * as in English typesetting; + // * for better UX thanks to a more button-like appearance; + // * for stylistic consistency with the expand-collapse button + self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', + self::C_STR_FOOTNOTES_STYLING_AFTER => ']', + + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', + + // The mouse over content truncation should be enabled by default + // to raise awareness of the functionality and to prevent the screen + // from being filled at mouse-over, and to allow the Continue reading: + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', + + // The truncation length is raised from 150 to 200 chars: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, + + // The default position should not be lateral because of the risk + // the box gets squeezed between note anchor at line end and window edge, + // and top because reading at the bottom of the window is more likely: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', + + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, + // The vertical offset must be negative for the box not to cover + // the current line of text (web coordinates origin is top left): + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, + + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', + // The mouse over box shouldn’t feature a colored background + // by default, due to diverging user preferences. White is neutral: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH => 1, - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99', - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 3, - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 0, + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99', + + // The mouse over box corners mustn’t be rounded as that is outdated: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, + + // The width should be limited to start with, for the box to have shape: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', self::C_STR_HYPERLINK_ARROW => '↑', self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', self::C_STR_CUSTOM_CSS => '' ), - // These should all be enabled by default. + // We might wish to enable all these by default, but + // in titles, footnotes are functionally pointless in WordPress. // See "footnotes_storage_expert" => array( - self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => 'yes', + self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '', self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'yes', self::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT => 'yes', - self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => 'yes', + self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '', self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => 'yes', - self::C_BOOL_EXPERT_LOOKUP_THE_POST => 'yes' + self::C_BOOL_EXPERT_LOOKUP_THE_POST => '' ) ); diff --git a/class/task.php b/class/task.php index fa9d12c..ed88011 100644 --- a/class/task.php +++ b/class/task.php @@ -11,7 +11,7 @@ * Edited for v2.0.5: Autoload / infinite scroll support added thanks to code from * @docteurfitness * - * Last modified 2020-11-05T0524+0100 + * Last modified 2020-11-06T0425+0100 */ // If called directly, abort: @@ -491,11 +491,12 @@ class MCI_Footnotes_Task { // generate content of footnote index cell $l_str_FirstFootnoteIndex = ($l_str_Index + 1); // wrap each index # in a white-space:nowrap span - $l_str_FootnoteIndex = ''; + $l_str_FootnoteArrowIndex = ''; // wrap the arrow in a @media print { display:hidden } span - $l_str_FootnoteIndex .= '' . $l_str_Arrow . ' '; - // get the index - $l_str_FootnoteIndex .= MCI_Footnotes_Convert::Index(($l_str_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + $l_str_FootnoteArrowIndex .= '' . $l_str_Arrow . ' '; + // get the index; add support for legacy index placeholder: + $l_str_FootnoteArrowIndex .= MCI_Footnotes_Convert::Index(($l_str_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + $l_str_FootnoteIndex = MCI_Footnotes_Convert::Index(($l_str_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); // check if it isn't the last footnote in the array if ($l_str_FirstFootnoteIndex < count(self::$a_arr_Footnotes) && MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { @@ -506,20 +507,24 @@ class MCI_Footnotes_Task { // set the further footnote as empty so it won't be displayed later self::$a_arr_Footnotes[$l_str_CheckIndex] = ""; // add the footnote index to the actual index - $l_str_FootnoteIndex .= ', ' . MCI_Footnotes_Convert::Index(($l_str_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + $l_str_FootnoteArrowIndex .= ', ' . MCI_Footnotes_Convert::Index(($l_str_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); + $l_str_FootnoteIndex .= ', ' . MCI_Footnotes_Convert::Index(($l_str_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); } } } - $l_str_FootnoteIndex .= ''; + $l_str_FootnoteArrowIndex .= ''; - // replace all placeholders in the template templates/public/reference-container-body.html + // replace all placeholders in the template templates/public/reference-container-body.html + // The individual arrow and index placeholders are for backcompat $l_obj_Template->replace( array( - "post_id" => $l_int_PostID, - "id" => MCI_Footnotes_Convert::Index($l_str_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)), - "index" => $l_str_FootnoteIndex, - "text" => $l_str_FootnoteText + "post_id" => $l_int_PostID, + "id" => MCI_Footnotes_Convert::Index($l_str_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)), + "arrow" => $l_str_Arrow, + "index" => $l_str_FootnoteIndex, + "arrow-index" => $l_str_FootnoteArrowIndex, + "text" => $l_str_FootnoteText ) ); // extra line breaks for page source legibility: diff --git a/css/public.css b/css/public.css index 8e89433..bcbffb7 100755 --- a/css/public.css +++ b/css/public.css @@ -4,9 +4,9 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.0.6 + * Version: 2.0.7d0 * - * Last modified: 2020-11-05T1826+0100 + * Last modified: 2020-11-06T0325+0100 */ diff --git a/readme.txt b/readme.txt index 56cf767..1cda949 100755 --- a/readme.txt +++ b/readme.txt @@ -80,6 +80,10 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == += 2.0.7d0 = +- Update: Added backwards compatible support for legacy arrow and index placeholders in template +- Update: Set all hooks defaults back to legacy as in titles, footnotes are functionally pointless + = 2.0.6 = - Update: Autoload / infinite scroll support thanks to @docteurfitness - Bugfix: Layout: Footnote referrers: deleted vertical align tweaks for cross-theme and user agent compatibility diff --git a/templates/NOTE-FOR-WEBMASTERS.txt b/templates/NOTE-FOR-WEBMASTERS.txt new file mode 100644 index 0000000..ca224da --- /dev/null +++ b/templates/NOTE-FOR-WEBMASTERS.txt @@ -0,0 +1,28 @@ +MCI Footnotes WordPress plugin + +NOTE FOR WEBMASTERS + +Added: 2020-11-06T0424+0100 +Last modified: 2020-11-06T0431+0100 + +About the public templates + + +Template "reference-container-body.html" + +class/task.php(481) +css/public.css + +Supported placeholders: + +[[post_id]] makes the footnote ID unique for infinite scroll +[[id]] footnote number (1-based integer) + +[[arrow]] symbol alone, for backwards compatibility +[[index]] footnote index alone (or comma-separated enumeration) for backwards compatibility + +[[arrow-index]] new compound string starting with the arrow hidden in print + wrapping each index in a no-break span, example: + + ↑ 4, 5, 6, 7, 8, 9, 10, +[[text]] diff --git a/templates/public/reference-container-body.html b/templates/public/reference-container-body.html index 8af0475..b58a19a 100755 --- a/templates/public/reference-container-body.html +++ b/templates/public/reference-container-body.html @@ -4,7 +4,7 @@ class="footnote_plugin_index footnote_plugin_link" onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_tooltip_[[post_id]]_[[id]]');" >[[index]][[arrow-index]] Date: Fri, 6 Nov 2020 13:01:07 +0000 Subject: [PATCH 05/27] BUGFIX release v2.0.7 git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2413896 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/init.php | 32 ++++++++++++++++---------------- class/settings.php | 13 +++++++------ class/task.php | 24 ++++++++++-------------- css/public.css | 4 ++-- footnotes.php | 2 +- readme.txt | 8 ++++---- 6 files changed, 40 insertions(+), 43 deletions(-) diff --git a/class/init.php b/class/init.php index 9e09b93..1119ede 100644 --- a/class/init.php +++ b/class/init.php @@ -12,7 +12,7 @@ * Edited for v2.0.3: Added style sheet versioning 2020-10-29T1413+0100 * Edited for v2.0.4: Added jQuery UI from WordPress 2020-11-01T1902+0100 * - * Last modified: 2020-11-06T0324+0100 + * Last modified: 2020-11-06T1355+0100 */ @@ -65,14 +65,14 @@ class MCI_Footnotes { * * @author Stefan Herndler * @since 1.5.0 - * - * Edited for 1.6.5: replaced deprecated function create_function() - * - * Contributed by Felipe Lavín Z. Thankfully acknowledged. - * - * create_function() was deprecated in PHP 7.2: - * - * See also: + * + * Edited for 1.6.5: replaced deprecated function create_function() + * + * Contributed by Felipe Lavín Z. Thankfully acknowledged. + * + * create_function() was deprecated in PHP 7.2: + * + * See also: */ public function initializeWidgets() { register_widget("MCI_Footnotes_Widget_ReferenceContainer"); @@ -127,11 +127,11 @@ class MCI_Footnotes { // IMPORTANT: up-to-date plugin version number for cache busting: wp_enqueue_style( - 'mci-footnotes-css-public', - plugins_url('../css/public.css', __FILE__), - '', - '2.0.7d0' - ); - } - + 'mci-footnotes-css-public', + plugins_url('../css/public.css', __FILE__), + '', + '2.0.7' + ); + } + } diff --git a/class/settings.php b/class/settings.php index 24302ef..d8f3dd5 100644 --- a/class/settings.php +++ b/class/settings.php @@ -8,7 +8,7 @@ * * Edited for: * v2.0.4 2020-11-02T2115+0100 - * v2.0.7 2020-11-06T0321+0100 + * v2.0.7 2020-11-06T1342+0100 */ @@ -437,16 +437,17 @@ class MCI_Footnotes_Settings { self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', self::C_STR_CUSTOM_CSS => '' ), - // We might wish to enable all these by default, but - // in titles, footnotes are functionally pointless in WordPress. + // These should all be enabled by default to prevent users from + // thinking at first that the feature is broken in post titles. // See + // In titles, footnotes are functionally pointless in WordPress. "footnotes_storage_expert" => array( - self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '', + self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => 'yes', self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'yes', self::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT => 'yes', - self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '', + self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => 'yes', self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => 'yes', - self::C_BOOL_EXPERT_LOOKUP_THE_POST => '' + self::C_BOOL_EXPERT_LOOKUP_THE_POST => ''//NEVER ENABLE THIS HOOK!!!!! ) ); diff --git a/class/task.php b/class/task.php index ed88011..c03a021 100644 --- a/class/task.php +++ b/class/task.php @@ -11,7 +11,7 @@ * Edited for v2.0.5: Autoload / infinite scroll support added thanks to code from * @docteurfitness * - * Last modified 2020-11-06T0425+0100 + * Last modified 2020-11-06T1344+0100 */ // If called directly, abort: @@ -58,42 +58,38 @@ class MCI_Footnotes_Task { * @author Stefan Herndler * @since 1.5.0 * - * Edited for v2.0.5 2020-11-02T0330+0100 2020-11-04T2006+0100 + * Edited for v2.0.5 through v2.0.7 2020-11-02T0330+0100..2020-11-06T1344+0100 * * Explicitly setting all priority to (default) "10" instead of lowest "PHP_INT_MAX", * especially for the_content, makes the footnotes reference container display * beneath the content and above other features added by other plugins. * Requested by users: * Documentation: - * - * But then, the blog engine calls this plugin in the editor, as reported in: - * - * */ public function registerHooks() { // append custom css to the header - add_filter('wp_head', array($this, "wp_head"), PHP_INT_MAX); + add_filter('wp_head', array($this, "wp_head"), 10); // append the love and share me slug to the footer - add_filter('wp_footer', array($this, "wp_footer"), PHP_INT_MAX); + add_filter('wp_footer', array($this, "wp_footer"), 10); if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE))) { - add_filter('the_title', array($this, "the_title"), PHP_INT_MAX); + add_filter('the_title', array($this, "the_title"), 10); } if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT))) { - add_filter('the_content', array($this, "the_content"), PHP_INT_MAX); + add_filter('the_content', array($this, "the_content"), 10); } if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT))) { - add_filter('the_excerpt', array($this, "the_excerpt"), PHP_INT_MAX); + add_filter('the_excerpt', array($this, "the_excerpt"), 10); } if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE))) { - add_filter('widget_title', array($this, "widget_title"), PHP_INT_MAX); + add_filter('widget_title', array($this, "widget_title"), 10); } if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT))) { - add_filter('widget_text', array($this, "widget_text"), PHP_INT_MAX); + add_filter('widget_text', array($this, "widget_text"), 10); } if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_POST))) { - add_filter('the_post', array($this, "the_post"), PHP_INT_MAX); + add_filter('the_post', array($this, "the_post"), 10); } // reset stored footnotes when displaying the header self::$a_arr_Footnotes = array(); diff --git a/css/public.css b/css/public.css index bcbffb7..2fe0a9c 100755 --- a/css/public.css +++ b/css/public.css @@ -4,9 +4,9 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.0.7d0 + * Version: 2.0.7 * - * Last modified: 2020-11-06T0325+0100 + * Last modified: 2020-11-06T1345+0100 */ diff --git a/footnotes.php b/footnotes.php index 28e7152..80fa4fb 100755 --- a/footnotes.php +++ b/footnotes.php @@ -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.0.6 + Version: 2.0.7 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages diff --git a/readme.txt b/readme.txt index 1cda949..a4b0dbe 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen Requires at least: 3.9 Tested up to: 5.5 Requires PHP: 5.6 -Stable Tag: 2.0.4 +Stable Tag: 2.0.7 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -80,9 +80,10 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == -= 2.0.7d0 = += 2.0.7 = +- BUGFIX: Disabled hook "the_post" **Any related code in the plugin shall disappear next** - Update: Added backwards compatible support for legacy arrow and index placeholders in template -- Update: Set all hooks defaults back to legacy as in titles, footnotes are functionally pointless +- Update: Settings defaults adjusted for better and more up-to-date tooltip layout = 2.0.6 = - Update: Autoload / infinite scroll support thanks to @docteurfitness @@ -95,7 +96,6 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** - Bugfix: UI: Reference container: Collapse button fully clickable, not sign only - Bugfix: UI: Reference container: Collapse button 'collapse' with minus sign not hyphen-minus - Update: UX: Tooltip: set display predelay to 0 for responsiveness (was 800 since 2.0.0, 400 before) -- BUGFIX: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility) = 2.0.5 = - Bugfix: Get references container close to content, not below all other features, by priority level 10 From 89e6d9e9d7e9c1fb4f8114bcb61ebc52db47ee3d Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Fri, 6 Nov 2020 14:20:33 +0000 Subject: [PATCH 06/27] Stable release v2.0.8 with both critical changes reverted git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2413937 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/init.php | 4 ++-- class/task.php | 21 ++++++++++++--------- css/public.css | 4 ++-- footnotes.php | 2 +- readme.txt | 7 ++++++- 5 files changed, 23 insertions(+), 15 deletions(-) diff --git a/class/init.php b/class/init.php index 1119ede..86eca9e 100644 --- a/class/init.php +++ b/class/init.php @@ -12,7 +12,7 @@ * Edited for v2.0.3: Added style sheet versioning 2020-10-29T1413+0100 * Edited for v2.0.4: Added jQuery UI from WordPress 2020-11-01T1902+0100 * - * Last modified: 2020-11-06T1355+0100 + * Last modified: 2020-11-06T1511+0100 */ @@ -130,7 +130,7 @@ class MCI_Footnotes { 'mci-footnotes-css-public', plugins_url('../css/public.css', __FILE__), '', - '2.0.7' + '2.0.8' ); } diff --git a/class/task.php b/class/task.php index c03a021..4d1a0bc 100644 --- a/class/task.php +++ b/class/task.php @@ -11,7 +11,7 @@ * Edited for v2.0.5: Autoload / infinite scroll support added thanks to code from * @docteurfitness * - * Last modified 2020-11-06T1344+0100 + * Last modified 2020-11-06T1516+0100 */ // If called directly, abort: @@ -65,31 +65,34 @@ class MCI_Footnotes_Task { * beneath the content and above other features added by other plugins. * Requested by users: * Documentation: + * + * But this change is suspected to cause issues and needs to be assessed! + * See */ public function registerHooks() { // append custom css to the header - add_filter('wp_head', array($this, "wp_head"), 10); + add_filter('wp_head', array($this, "wp_head"), PHP_INT_MAX); // append the love and share me slug to the footer - add_filter('wp_footer', array($this, "wp_footer"), 10); + add_filter('wp_footer', array($this, "wp_footer"), PHP_INT_MAX); if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE))) { - add_filter('the_title', array($this, "the_title"), 10); + add_filter('the_title', array($this, "the_title"), PHP_INT_MAX); } if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT))) { - add_filter('the_content', array($this, "the_content"), 10); + add_filter('the_content', array($this, "the_content"), PHP_INT_MAX); } if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT))) { - add_filter('the_excerpt', array($this, "the_excerpt"), 10); + add_filter('the_excerpt', array($this, "the_excerpt"), PHP_INT_MAX); } if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE))) { - add_filter('widget_title', array($this, "widget_title"), 10); + add_filter('widget_title', array($this, "widget_title"), PHP_INT_MAX); } if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT))) { - add_filter('widget_text', array($this, "widget_text"), 10); + add_filter('widget_text', array($this, "widget_text"), PHP_INT_MAX); } if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_POST))) { - add_filter('the_post', array($this, "the_post"), 10); + add_filter('the_post', array($this, "the_post"), PHP_INT_MAX); } // reset stored footnotes when displaying the header self::$a_arr_Footnotes = array(); diff --git a/css/public.css b/css/public.css index 2fe0a9c..cebe253 100755 --- a/css/public.css +++ b/css/public.css @@ -4,9 +4,9 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.0.7 + * Version: 2.0.8 * - * Last modified: 2020-11-06T1345+0100 + * Last modified: 2020-11-06T1511+0100 */ diff --git a/footnotes.php b/footnotes.php index 80fa4fb..eed9552 100755 --- a/footnotes.php +++ b/footnotes.php @@ -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.0.7 + Version: 2.0.8 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages diff --git a/readme.txt b/readme.txt index a4b0dbe..b3f97b9 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen Requires at least: 3.9 Tested up to: 5.5 Requires PHP: 5.6 -Stable Tag: 2.0.7 +Stable Tag: 2.0.8 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -80,8 +80,12 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == += 2.0.8 = +- BUGFIX: Priority level back to PHP_INT_MAX (need to get in touch with other plugins) + = 2.0.7 = - BUGFIX: Disabled hook "the_post" **Any related code in the plugin shall disappear next** +- Update: Set priority level back to 10 assuming it is unproblematic - Update: Added backwards compatible support for legacy arrow and index placeholders in template - Update: Settings defaults adjusted for better and more up-to-date tooltip layout @@ -96,6 +100,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** - Bugfix: UI: Reference container: Collapse button fully clickable, not sign only - Bugfix: UI: Reference container: Collapse button 'collapse' with minus sign not hyphen-minus - Update: UX: Tooltip: set display predelay to 0 for responsiveness (was 800 since 2.0.0, 400 before) +- BUGFIX: Priority level back to PHP_INT_MAX (ref container positioning not this plugin’s responsibility) = 2.0.5 = - Bugfix: Get references container close to content, not below all other features, by priority level 10 From b57b80f123003ebcad9c98c4705f9b1cac68a4bd Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Sat, 7 Nov 2020 13:31:49 +0000 Subject: [PATCH 07/27] developer version 2.0.9d0 (delta 0) in response to user request git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2414450 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/init.php | 9 ++++--- css/public.css | 29 +++++++++++++---------- css/settings.css | 5 ++-- footnotes.php | 2 +- readme.txt | 7 ++++-- templates/NOTE-FOR-WEBMASTERS.txt | 14 +++++++---- templates/public/footnote.html | 1 + templates/public/reference-container.html | 23 ++++++++++++------ 8 files changed, 58 insertions(+), 32 deletions(-) diff --git a/class/init.php b/class/init.php index 86eca9e..cba5582 100644 --- a/class/init.php +++ b/class/init.php @@ -2,17 +2,20 @@ /** * Includes the main Class of the Plugin. * - * IMPORTANT: In registerPublic(), keep plugin version # up to date for cache busting. + * *********************************************************************************************** + * IMPORTANT: In registerPublic() line 134: keep plugin version # up to date for cache busting. * + * *********************************************************************************************** * * @filesource * @author Stefan Herndler * @since 1.5.0 12.09.14 10:56 * + * Edited for v1.6.5: Replaced deprecated function create_function() * Edited for v2.0.0: Added jQueryUI from CDN 2020-10-26T1907+0100 * Edited for v2.0.3: Added style sheet versioning 2020-10-29T1413+0100 * Edited for v2.0.4: Added jQuery UI from WordPress 2020-11-01T1902+0100 * - * Last modified: 2020-11-06T1511+0100 + * Continual update of version number. */ @@ -130,7 +133,7 @@ class MCI_Footnotes { 'mci-footnotes-css-public', plugins_url('../css/public.css', __FILE__), '', - '2.0.8' + '2.0.9d0' ); } diff --git a/css/public.css b/css/public.css index cebe253..eb4b36c 100755 --- a/css/public.css +++ b/css/public.css @@ -4,9 +4,9 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.0.8 + * Version: 2.0.9d0 * - * Last modified: 2020-11-06T1511+0100 + * Last modified: 2020-11-07T1424+0100 */ @@ -34,19 +34,21 @@ /* Inline footnote referrers * aka superscript footnote anchors * - * Class footnote_plugin_tooltip_text is the referrer and surroundings + * referrer and surroundings: + * .footnote_referrer = enclosing + * .footnote_plugin_tooltip_text = inner */ +.footnote_referrer, .footnote_plugin_tooltip_text { + text-decoration: none !important; cursor: pointer; z-index: 1; } -.footnote_plugin_tooltip_text { - display: inline-block; - text-decoration: none; -} +.footnote_referrer:hover, .footnote_plugin_tooltip_text:hover { text-decoration: underline; + font-weight: inherit; } /* tooltip infobox */ @@ -102,12 +104,14 @@ span.footnote_tooltip { /* fully clickable, not sign only */ .footnote_reference_container_collapse_button { cursor: pointer; + font-size: 1.2em !important; + padding-left: .5em; } .footnote_container_prepare > p > span:last-child a { text-decoration: none !important; } .footnote_container_prepare > p > span:last-child a:hover { - text-decoration: underline; + text-decoration: underline !important; color: #008800; } @@ -138,7 +142,7 @@ span.footnote_tooltip { text-decoration: underline !important; } .footnote_plugin_index { - cursor: pointer; + cursor: pointer; overflow-wrap: unset; word-wrap: unset; word-wrap: normal !important; @@ -149,7 +153,7 @@ span.footnote_tooltip { overflow: hidden; } .footnote_index_item { - white-space: nowrap; + white-space: nowrap; } .footnote_plugin_text { width: unset; /*unset width of text column to fix site issues*/ @@ -167,10 +171,11 @@ span.footnote_tooltip { * Printing a table, browsers tend to avoid page breaks, * but it takes a wrapper to avoid a page break before the table. * - * UI elements (button, arrows) and link styling are removed. + * UI elements - expand button, arrows - are hidden in print; + * link styling is reverted so as to not gray out referrers/numbers. */ -.footnote_container_overall_wrapper { +.footnote_container_wrapper { page-break-inside: avoid; } diff --git a/css/settings.css b/css/settings.css index 7d86001..05f1e32 100755 --- a/css/settings.css +++ b/css/settings.css @@ -4,8 +4,8 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.0.4 - * Last modified: 2020-11-01T0415+0100 + * Version: 2.0.9 + * Last modified: 2020-11-06T2321+0100 */ @@ -41,7 +41,6 @@ input[type=text], input[type=password], textarea, select { padding-left: 8px !important; padding-right: 8px !important; - width: 80% !important; } textarea { diff --git a/footnotes.php b/footnotes.php index eed9552..6e42b1b 100755 --- a/footnotes.php +++ b/footnotes.php @@ -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.0.8 + Version: 2.0.9d0 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages diff --git a/readme.txt b/readme.txt index b3f97b9..3167166 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen Requires at least: 3.9 Tested up to: 5.5 Requires PHP: 5.6 -Stable Tag: 2.0.8 +Stable Tag: 2.0.9d0 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -80,11 +80,14 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == += 2.0.9d0 = +- Bugfix: Layout: Footnote referrers: more efficiently disable underline unless hovered + = 2.0.8 = - BUGFIX: Priority level back to PHP_INT_MAX (need to get in touch with other plugins) = 2.0.7 = -- BUGFIX: Disabled hook "the_post" **Any related code in the plugin shall disappear next** +- BUGFIX: Disabled hook "the_post" **Any related code in the plugin shall disappear** - Update: Set priority level back to 10 assuming it is unproblematic - Update: Added backwards compatible support for legacy arrow and index placeholders in template - Update: Settings defaults adjusted for better and more up-to-date tooltip layout diff --git a/templates/NOTE-FOR-WEBMASTERS.txt b/templates/NOTE-FOR-WEBMASTERS.txt index ca224da..67ba988 100644 --- a/templates/NOTE-FOR-WEBMASTERS.txt +++ b/templates/NOTE-FOR-WEBMASTERS.txt @@ -1,6 +1,7 @@ MCI Footnotes WordPress plugin NOTE FOR WEBMASTERS +‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ Added: 2020-11-06T0424+0100 Last modified: 2020-11-06T0431+0100 @@ -8,12 +9,17 @@ Last modified: 2020-11-06T0431+0100 About the public templates -Template "reference-container-body.html" +## Template "reference-container-body.html" + ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ + > class/task.php(481) + > css/public.css -class/task.php(481) -css/public.css +* Elements: -Supported placeholders: + Present for styling. + + +* Supported placeholders: [[post_id]] makes the footnote ID unique for infinite scroll [[id]] footnote number (1-based integer) diff --git a/templates/public/footnote.html b/templates/public/footnote.html index 6b55a17..421a5df 100755 --- a/templates/public/footnote.html +++ b/templates/public/footnote.html @@ -1,4 +1,5 @@ -
-

+

+
+ - -
-
[[content]] From 73204081969d9657d78947e0ae1ba4dff14ab276 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Sat, 7 Nov 2020 13:35:22 +0000 Subject: [PATCH 08/27] developer version 2.0.9d0 (delta 0) in response to user request (corr readme) git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2414453 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 3167166..4141b4b 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen Requires at least: 3.9 Tested up to: 5.5 Requires PHP: 5.6 -Stable Tag: 2.0.9d0 +Stable Tag: 2.0.8 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html From 10023072f050004f2049d14b463181acd733032d Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Sat, 7 Nov 2020 15:14:07 +0000 Subject: [PATCH 09/27] developer version 2.0.9d1 trying to fix broken tooltip display on a particular website git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2414483 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/init.php | 35 ++++++++++++++++++++++++++--------- css/public.css | 4 ++-- css/settings.css | 5 +++-- footnotes.php | 2 +- readme.txt | 3 +++ 5 files changed, 35 insertions(+), 14 deletions(-) diff --git a/class/init.php b/class/init.php index cba5582..427c680 100644 --- a/class/init.php +++ b/class/init.php @@ -2,16 +2,16 @@ /** * Includes the main Class of the Plugin. * - * *********************************************************************************************** - * IMPORTANT: In registerPublic() line 134: keep plugin version # up to date for cache busting. * - * *********************************************************************************************** + * ****************************************************************************************************** + * IMPORTANT: In registerPublic() line 134: Please keep plugin version # up to date for cache busting. * + * ****************************************************************************************************** * * @filesource * @author Stefan Herndler * @since 1.5.0 12.09.14 10:56 * * Edited for v1.6.5: Replaced deprecated function create_function() - * Edited for v2.0.0: Added jQueryUI from CDN 2020-10-26T1907+0100 + * Edited for v2.0.0: Added jQueryUI from Cloudflare 2020-10-26T1907+0100 * Edited for v2.0.3: Added style sheet versioning 2020-10-29T1413+0100 * Edited for v2.0.4: Added jQuery UI from WordPress 2020-11-01T1902+0100 * @@ -108,7 +108,8 @@ class MCI_Footnotes { * @author Stefan Herndler * @since 1.5.0 * - * Updated for v2.0.4 by adding jQueryUI from WordPress following @check2020de: + * Updated for v2.0.0 adding jQuery UI + * Updated for v2.0.4 by adding jQuery UI from WordPress following @check2020de: * * See * @@ -116,24 +117,40 @@ class MCI_Footnotes { */ public function registerPublic() { - // add the jQuery plugin (already registered by WordPress) + ### SCRIPTS + + // add the jQuery plugin registered by WordPress wp_enqueue_script( 'jquery' ); - // Add jQueryUI: 'no need to enqueue -core, because dependencies are set' + + // Add the jQuery UI libraries registered by WordPress: + // 'no need to enqueue -core, because dependencies are set' + // Source: wp_enqueue_script( 'jquery-ui-widget' ); wp_enqueue_script( 'jquery-ui-mouse' ); wp_enqueue_script( 'jquery-ui-accordion' ); wp_enqueue_script( 'jquery-ui-autocomplete' ); wp_enqueue_script( 'jquery-ui-slider' ); + // Should that not work, fetch jQuery UI from cdnjs.cloudflare.com: + // Add jQuery UI following @vonpiernik: + // : + // This was enabled in Footnotes v2.0.0 through v2.0.3. + // Re-added for 2.0.9d1 to look whether it can fix a broken tooltip display. 2020-11-07T1601+0100 + wp_register_script( 'jQueryUI', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', null, null, true ); + wp_enqueue_script( 'jQueryUI' ); + // Add jQuery tools: wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__)); - // IMPORTANT: up-to-date plugin version number for cache busting: + + ### STYLES + + // IMPORTANT: up-to-date plugin version number NEEDED for cache busting: wp_enqueue_style( 'mci-footnotes-css-public', plugins_url('../css/public.css', __FILE__), '', - '2.0.9d0' + '2.0.9d1' ); } diff --git a/css/public.css b/css/public.css index eb4b36c..b297bae 100755 --- a/css/public.css +++ b/css/public.css @@ -4,9 +4,9 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.0.9d0 + * Version: 2.0.9d1 * - * Last modified: 2020-11-07T1424+0100 + * Last modified: 2020-11-07T1608+0100 */ diff --git a/css/settings.css b/css/settings.css index 05f1e32..6342f5b 100755 --- a/css/settings.css +++ b/css/settings.css @@ -4,8 +4,9 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.0.9 - * Last modified: 2020-11-06T2321+0100 + * Version: 2.0.9d1 + * + * Last modified: 2020-11-07T1608+0100 */ diff --git a/footnotes.php b/footnotes.php index 6e42b1b..d8c59de 100755 --- a/footnotes.php +++ b/footnotes.php @@ -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.0.9d0 + Version: 2.0.9d1 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages diff --git a/readme.txt b/readme.txt index 4141b4b..e64ca30 100755 --- a/readme.txt +++ b/readme.txt @@ -80,6 +80,9 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == += 2.0.9d1 = +- Bugfix: Re-added jQuery UI from third party to look whether it can fix a broken tooltip display 2020-11-07T1604+0100 + = 2.0.9d0 = - Bugfix: Layout: Footnote referrers: more efficiently disable underline unless hovered From 61b10c9c6a2d2962b91d62fc645d72b60700b24c Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Sun, 8 Nov 2020 15:57:09 +0000 Subject: [PATCH 10/27] Development version 2.0.9d2 in response to user on forum, to meet user requirement git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2414776 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/init.php | 27 ++++++----- css/public.css | 58 +++++++++++++---------- footnotes.php | 2 +- readme.txt | 8 +++- templates/public/reference-container.html | 18 +++++-- 5 files changed, 68 insertions(+), 45 deletions(-) diff --git a/class/init.php b/class/init.php index 427c680..48d7765 100644 --- a/class/init.php +++ b/class/init.php @@ -122,14 +122,17 @@ class MCI_Footnotes { // add the jQuery plugin registered by WordPress wp_enqueue_script( 'jquery' ); - // Add the jQuery UI libraries registered by WordPress: - // 'no need to enqueue -core, because dependencies are set' - // Source: - wp_enqueue_script( 'jquery-ui-widget' ); - wp_enqueue_script( 'jquery-ui-mouse' ); - wp_enqueue_script( 'jquery-ui-accordion' ); - wp_enqueue_script( 'jquery-ui-autocomplete' ); - wp_enqueue_script( 'jquery-ui-slider' ); +// // Add jQuery Tools: +// wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__)); +// +// // Add the jQuery UI libraries registered by WordPress: +// // 'no need to enqueue -core, because dependencies are set' +// // Source: +// wp_enqueue_script( 'jquery-ui-widget' ); +// wp_enqueue_script( 'jquery-ui-mouse' ); +// wp_enqueue_script( 'jquery-ui-accordion' ); +// wp_enqueue_script( 'jquery-ui-autocomplete' ); +// wp_enqueue_script( 'jquery-ui-slider' ); // Should that not work, fetch jQuery UI from cdnjs.cloudflare.com: // Add jQuery UI following @vonpiernik: @@ -139,9 +142,9 @@ class MCI_Footnotes { wp_register_script( 'jQueryUI', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', null, null, true ); wp_enqueue_script( 'jQueryUI' ); - // Add jQuery tools: - wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__)); - + // Add jQuery Tools and finish adding jQueryUI: 2020-11-08T1638+0100 + wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']); + ### STYLES @@ -150,7 +153,7 @@ class MCI_Footnotes { 'mci-footnotes-css-public', plugins_url('../css/public.css', __FILE__), '', - '2.0.9d1' + '2.0.9d2' ); } diff --git a/css/public.css b/css/public.css index b297bae..0551302 100755 --- a/css/public.css +++ b/css/public.css @@ -4,9 +4,9 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.0.9d1 + * Version: 2.0.9d2 * - * Last modified: 2020-11-07T1608+0100 + * Last modified: 2020-11-08T1627+0100 */ @@ -31,28 +31,31 @@ color: #545f5a; } -/* Inline footnote referrers +/* + * Inline footnote referrers * aka superscript footnote anchors * * referrer and surroundings: - * .footnote_referrer = enclosing - * .footnote_plugin_tooltip_text = inner + * .footnote_referrer = enclosing + * .footnote_plugin_tooltip_text = inner */ -.footnote_referrer, -.footnote_plugin_tooltip_text { - text-decoration: none !important; - cursor: pointer; - z-index: 1; -} -.footnote_referrer:hover, + .footnote_referrer, + .main-content .footnote_referrer, + .footnote_plugin_tooltip_text { + text-decoration: none !important; + border-bottom: none !important; + cursor: pointer; + z-index: 1; + } + .footnote_referrer:hover, .footnote_plugin_tooltip_text:hover { text-decoration: underline; font-weight: inherit; } -/* tooltip infobox */ - +/* tooltip infobox + */ span.footnote_tooltip { font-size: inherit; text-align: left; @@ -70,10 +73,12 @@ span.footnote_tooltip { text-decoration: underline !important; } -/* Footnotes reference container +/* + * Footnote references container */ -/* label */ +/* label + */ .footnote_container_prepare { display: block !important; padding-top: 24px !important; @@ -100,22 +105,21 @@ span.footnote_tooltip { font-size: 1.5em !important; } -/* collapse button */ -/* fully clickable, not sign only */ +/* collapse button +/* fully clickable, not sign only + */ .footnote_reference_container_collapse_button { cursor: pointer; - font-size: 1.2em !important; padding-left: .5em; + font-size: 1.3em !important; + vertical-align: 2px; } .footnote_container_prepare > p > span:last-child a { text-decoration: none !important; } -.footnote_container_prepare > p > span:last-child a:hover { - text-decoration: underline !important; - color: #008800; -} -/* Table starts here */ +/* table + */ .footnote-reference-container { width: 100%; border: none; @@ -125,7 +129,8 @@ span.footnote_tooltip { * class footnote_plugin_link is for backcompat. * Used in reference-container-body.html * See -.footnote_plugin_link, */ + */ +.footnote_plugin_link, .footnote_plugin_index, .footnote_plugin_text { border:none !important; @@ -166,7 +171,8 @@ span.footnote_tooltip { } } -/* Footnotes printing style rules +/* + * Footnotes printing style rules * * Printing a table, browsers tend to avoid page breaks, * but it takes a wrapper to avoid a page break before the table. diff --git a/footnotes.php b/footnotes.php index d8c59de..e4b4816 100755 --- a/footnotes.php +++ b/footnotes.php @@ -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.0.9d1 + Version: 2.0.9d2 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages diff --git a/readme.txt b/readme.txt index e64ca30..32800fa 100755 --- a/readme.txt +++ b/readme.txt @@ -80,8 +80,14 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == += 2.0.9d2 = +- Bugfix: Layout: Footnote referrers: disabled bottom border 2020-11-08T1632+0100 +- Bugfix: Libraries: Correct jQuery UI from third party, disabled from WordPress 2020-11-08T1641+0100 +- Update: Accessibility: added 'speaker-mute' class to reference container + = 2.0.9d1 = -- Bugfix: Re-added jQuery UI from third party to look whether it can fix a broken tooltip display 2020-11-07T1604+0100 +- Bugfix: Libraries: Re-added jQuery UI from third party to look whether it can fix a broken tooltip display 2020-11-07T1604+0100 +- Bugfix: Settings layout: removed 80% width rule for input, text areas, select boxes = 2.0.9d0 = - Bugfix: Layout: Footnote referrers: more efficiently disable underline unless hovered diff --git a/templates/public/reference-container.html b/templates/public/reference-container.html index 75f2017..8f68f00 100644 --- a/templates/public/reference-container.html +++ b/templates/public/reference-container.html @@ -1,5 +1,5 @@
function footnote_expand_reference_container_[[post_id]]() { jQuery('#footnote_references_container_[[post_id]]').show(); - jQuery('#footnote_reference_container_collapse_button_[[post_id]]').text(' − '); + jQuery('#footnote_reference_container_collapse_button_[[post_id]]').text('−'); } function footnote_collapse_reference_container_[[post_id]]() { jQuery('#footnote_references_container_[[post_id]]').hide(); - jQuery('#footnote_reference_container_collapse_button_[[post_id]]').text(' + '); + jQuery('#footnote_reference_container_collapse_button_[[post_id]]').text('+'); } function footnote_expand_collapse_reference_container_[[post_id]]() { if (jQuery('#footnote_references_container_[[post_id]]').is(':hidden')) { @@ -56,5 +56,13 @@ }, 380);/*speed*/ } - } + } + $( function() { + if (jQuery.ui) { + alert( "The jQuery UI framework has been properly loaded." ); + } + } + function() { + alert( "There is a problem!" ); + } From dd942f4c51c5ba6b3fbfd2f741e7fa3d75924137 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Sun, 8 Nov 2020 16:30:40 +0000 Subject: [PATCH 11/27] =?UTF-8?q?Development=20version=202.0.9d2=20in=20re?= =?UTF-8?q?sponse=20to=20user=20on=20forum,=20to=20meet=20user=20requireme?= =?UTF-8?q?nt.=20Forgot=20to=20remove=20test=20code=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2414785 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- templates/public/reference-container.html | 8 -------- 1 file changed, 8 deletions(-) diff --git a/templates/public/reference-container.html b/templates/public/reference-container.html index 8f68f00..2fe0c54 100644 --- a/templates/public/reference-container.html +++ b/templates/public/reference-container.html @@ -57,12 +57,4 @@ 380);/*speed*/ } } - $( function() { - if (jQuery.ui) { - alert( "The jQuery UI framework has been properly loaded." ); - } - } - function() { - alert( "There is a problem!" ); - } From 9f732e0b383052cf0eff626ab965a9902a8bcfac Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Sun, 8 Nov 2020 17:54:50 +0000 Subject: [PATCH 12/27] Development version 2.0.9d3 DISABLED the_post HOOK git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2414813 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/init.php | 2 +- class/task.php | 32 +++++++++++++++++--------------- css/public.css | 4 ++-- footnotes.php | 2 +- readme.txt | 7 +++++-- 5 files changed, 26 insertions(+), 21 deletions(-) diff --git a/class/init.php b/class/init.php index 48d7765..0906a1a 100644 --- a/class/init.php +++ b/class/init.php @@ -153,7 +153,7 @@ class MCI_Footnotes { 'mci-footnotes-css-public', plugins_url('../css/public.css', __FILE__), '', - '2.0.9d2' + '2.0.9d3' ); } diff --git a/class/task.php b/class/task.php index 4d1a0bc..95f1475 100644 --- a/class/task.php +++ b/class/task.php @@ -11,7 +11,9 @@ * Edited for v2.0.5: Autoload / infinite scroll support added thanks to code from * @docteurfitness * - * Last modified 2020-11-06T1516+0100 + * Edited for v2.0.9: DISABLED the_post HOOK 2020-11-08T1839+0100 + * + * Last modified 2020-11-08T1850+0100 */ // If called directly, abort: @@ -65,9 +67,9 @@ class MCI_Footnotes_Task { * beneath the content and above other features added by other plugins. * Requested by users: * Documentation: - * - * But this change is suspected to cause issues and needs to be assessed! - * See + * + * But this change is suspected to cause issues and needs to be assessed! + * See */ public function registerHooks() { // append custom css to the header @@ -91,9 +93,9 @@ class MCI_Footnotes_Task { if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT))) { add_filter('widget_text', array($this, "widget_text"), PHP_INT_MAX); } - if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_POST))) { - add_filter('the_post', array($this, "the_post"), PHP_INT_MAX); - } + // DISABLED the_post HOOK 2020-11-08T1839+0100 + // + // // reset stored footnotes when displaying the header self::$a_arr_Footnotes = array(); self::$a_bool_AllowLoveMe = true; @@ -488,12 +490,12 @@ class MCI_Footnotes_Task { continue; } // generate content of footnote index cell - $l_str_FirstFootnoteIndex = ($l_str_Index + 1); - // wrap each index # in a white-space:nowrap span - $l_str_FootnoteArrowIndex = ''; - // wrap the arrow in a @media print { display:hidden } span - $l_str_FootnoteArrowIndex .= '' . $l_str_Arrow . ' '; - // get the index; add support for legacy index placeholder: + $l_str_FirstFootnoteIndex = ($l_str_Index + 1); + // wrap each index # in a white-space:nowrap span + $l_str_FootnoteArrowIndex = ''; + // wrap the arrow in a @media print { display:hidden } span + $l_str_FootnoteArrowIndex .= '' . $l_str_Arrow . ' '; + // get the index; add support for legacy index placeholder: $l_str_FootnoteArrowIndex .= MCI_Footnotes_Convert::Index(($l_str_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); $l_str_FootnoteIndex = MCI_Footnotes_Convert::Index(($l_str_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); @@ -514,8 +516,8 @@ class MCI_Footnotes_Task { $l_str_FootnoteArrowIndex .= ''; - // replace all placeholders in the template templates/public/reference-container-body.html - // The individual arrow and index placeholders are for backcompat + // replace all placeholders in the template templates/public/reference-container-body.html + // The individual arrow and index placeholders are for backcompat $l_obj_Template->replace( array( "post_id" => $l_int_PostID, diff --git a/css/public.css b/css/public.css index 0551302..cd5b68e 100755 --- a/css/public.css +++ b/css/public.css @@ -4,9 +4,9 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.0.9d2 + * Version: 2.0.9d3 * - * Last modified: 2020-11-08T1627+0100 + * Last modified: 2020-11-08T1852+0100 */ diff --git a/footnotes.php b/footnotes.php index e4b4816..72e857e 100755 --- a/footnotes.php +++ b/footnotes.php @@ -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.0.9d2 + Version: 2.0.9d3 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages diff --git a/readme.txt b/readme.txt index 32800fa..3fd9f70 100755 --- a/readme.txt +++ b/readme.txt @@ -80,14 +80,17 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == += 2.0.9d3 = +- BUGFIX: DISABLED the_post HOOK 2020-11-08T1839+0100 + = 2.0.9d2 = - Bugfix: Layout: Footnote referrers: disabled bottom border 2020-11-08T1632+0100 - Bugfix: Libraries: Correct jQuery UI from third party, disabled from WordPress 2020-11-08T1641+0100 -- Update: Accessibility: added 'speaker-mute' class to reference container +- Update: Accessibility: added 'speaker-mute' class to reference container, to meet user needs = 2.0.9d1 = - Bugfix: Libraries: Re-added jQuery UI from third party to look whether it can fix a broken tooltip display 2020-11-07T1604+0100 -- Bugfix: Settings layout: removed 80% width rule for input, text areas, select boxes +- Bugfix: Settings layout: removed 80% width rule for input, text areas, select boxes, on user request = 2.0.9d0 = - Bugfix: Layout: Footnote referrers: more efficiently disable underline unless hovered From 2e85b40bc046c0c353f4e9c58a0c414ffb5894d9 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Sun, 8 Nov 2020 21:21:24 +0000 Subject: [PATCH 13/27] Feature: Tooltip 'Continue reading' button label customizable in Settongs; Stable release 2.1.0 git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2414862 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/dashboard/subpage-main.php | 11 +++--- class/init.php | 39 ++++++++++--------- class/settings.php | 22 ++++++----- class/task.php | 27 ++++++------- css/public.css | 4 +- css/settings.css | 12 ++++-- footnotes.php | 2 +- readme.txt | 22 ++++------- templates/dashboard/expert-lookup.html | 7 +--- .../settings-reference-container.html | 7 +++- 10 files changed, 78 insertions(+), 75 deletions(-) diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php index 8904a33..f199964 100644 --- a/class/dashboard/subpage-main.php +++ b/class/dashboard/subpage-main.php @@ -6,7 +6,9 @@ * @author Stefan Herndler * @since 1.5.0 14.09.14 14:47 * - * Edited for v2.0.4 2020-11-01T0509+0100 + * Edited for: + * v2.0.4 2020-11-01T0509+0100 + * v2.1.0 2020-11-08T2148+0100 */ /** @@ -119,6 +121,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { // replace all placeholders $l_obj_Template->replace( array( + "label-readon" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL, __("‘Read on’ button label", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "readon" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL), + "label-name" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME, __("References label", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "name" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME), @@ -465,10 +470,6 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { "label-widget-text" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT, "widget_text"), "widget-text" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT), "url-widget-text" => "http://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text", - - "label-post-object" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_POST, "the_post"), - "post-object" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_POST), - "url-post-object" => "http://codex.wordpress.org/Plugin_API/Filter_Reference/the_post" ) ); // display template with replaced placeholders diff --git a/class/init.php b/class/init.php index 0906a1a..35ca2d5 100644 --- a/class/init.php +++ b/class/init.php @@ -116,34 +116,35 @@ class MCI_Footnotes { * jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released. */ public function registerPublic() { - + ### SCRIPTS - + // add the jQuery plugin registered by WordPress wp_enqueue_script( 'jquery' ); - -// // Add jQuery Tools: -// wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__)); -// -// // Add the jQuery UI libraries registered by WordPress: -// // 'no need to enqueue -core, because dependencies are set' -// // Source: -// wp_enqueue_script( 'jquery-ui-widget' ); -// wp_enqueue_script( 'jquery-ui-mouse' ); -// wp_enqueue_script( 'jquery-ui-accordion' ); -// wp_enqueue_script( 'jquery-ui-autocomplete' ); -// wp_enqueue_script( 'jquery-ui-slider' ); - + + // Add jQuery Tools: + wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__)); + + // Add the jQuery UI libraries registered by WordPress: + // 'no need to enqueue -core, because dependencies are set' + // Source: + wp_enqueue_script( 'jquery-ui-widget' ); + wp_enqueue_script( 'jquery-ui-mouse' ); + wp_enqueue_script( 'jquery-ui-accordion' ); + wp_enqueue_script( 'jquery-ui-autocomplete' ); + wp_enqueue_script( 'jquery-ui-slider' ); + + // Should that not work, fetch jQuery UI from cdnjs.cloudflare.com: // Add jQuery UI following @vonpiernik: // : // This was enabled in Footnotes v2.0.0 through v2.0.3. // Re-added for 2.0.9d1 to look whether it can fix a broken tooltip display. 2020-11-07T1601+0100 - wp_register_script( 'jQueryUI', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', null, null, true ); - wp_enqueue_script( 'jQueryUI' ); + //wp_register_script( 'jQueryUI', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', null, null, true ); + //wp_enqueue_script( 'jQueryUI' ); // Add jQuery Tools and finish adding jQueryUI: 2020-11-08T1638+0100 - wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']); + //wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']); ### STYLES @@ -153,7 +154,7 @@ class MCI_Footnotes { 'mci-footnotes-css-public', plugins_url('../css/public.css', __FILE__), '', - '2.0.9d3' + '2.1.0' ); } diff --git a/class/settings.php b/class/settings.php index d8f3dd5..eaa242f 100644 --- a/class/settings.php +++ b/class/settings.php @@ -9,6 +9,7 @@ * Edited for: * v2.0.4 2020-11-02T2115+0100 * v2.0.7 2020-11-06T1342+0100 + * v2.1.0 2020-11-08T2149+0100 */ @@ -22,6 +23,16 @@ */ class MCI_Footnotes_Settings { + /** + * Settings Container Key for the label of the 'Read on' button in truncated tooltips + * + * @since 2.0.9 + * @var string + * + * 2020-11-08T2106+0100 + */ + const C_STR_FOOTNOTES_TOOLTIP_READON_LABEL = "footnote_inputfield_readon_label"; + /** * Settings Container Key for the label of the reference container. * @@ -337,15 +348,6 @@ class MCI_Footnotes_Settings { */ const C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT = "footnote_inputfield_expert_lookup_widget_text"; - /** - * Settings Container Key the activation of the_post hook. - * - * @author Stefan Herndler - * @since 1.5.5 - * @var string - */ - const C_BOOL_EXPERT_LOOKUP_THE_POST = "footnote_inputfield_expert_lookup_the_post"; - /** * Stores a singleton reference of this class. * @@ -373,6 +375,7 @@ class MCI_Footnotes_Settings { */ private $a_arr_Default = array( "footnotes_storage" => array( + self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading', self::C_STR_REFERENCE_CONTAINER_NAME => 'References', self::C_BOOL_REFERENCE_CONTAINER_COLLAPSE => '', self::C_STR_REFERENCE_CONTAINER_POSITION => 'post_end', @@ -447,7 +450,6 @@ class MCI_Footnotes_Settings { self::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT => 'yes', self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => 'yes', self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => 'yes', - self::C_BOOL_EXPERT_LOOKUP_THE_POST => ''//NEVER ENABLE THIS HOOK!!!!! ) ); diff --git a/class/task.php b/class/task.php index 95f1475..90648b4 100644 --- a/class/task.php +++ b/class/task.php @@ -12,8 +12,9 @@ * @docteurfitness * * Edited for v2.0.9: DISABLED the_post HOOK 2020-11-08T1839+0100 + * Edited for v2.1.0: Promoted the 'Continue reading' button from localization to customization 2020-11-08T2146+0100 * - * Last modified 2020-11-08T1850+0100 + * Last modified 2020-11-08T2146+0100 */ // If called directly, abort: @@ -257,17 +258,17 @@ class MCI_Footnotes_Task { * @since 1.5.4 * @param array|WP_Post $p_mixed_Posts */ - public function the_post(&$p_mixed_Posts) { - // single WP_Post object received - if (!is_array($p_mixed_Posts)) { - $p_mixed_Posts = $this->replacePostObject($p_mixed_Posts); - return; - } - // array of WP_Post objects received - for($l_int_Index = 0; $l_int_Index < count($p_mixed_Posts); $l_int_Index++) { - $p_mixed_Posts[$l_int_Index] = $this->replacePostObject($p_mixed_Posts[$l_int_Index]); - } - } +// public function the_post(&$p_mixed_Posts) { +// // single WP_Post object received +// if (!is_array($p_mixed_Posts)) { +// $p_mixed_Posts = $this->replacePostObject($p_mixed_Posts); +// return; +// } +// // array of WP_Post objects received +// for($l_int_Index = 0; $l_int_Index < count($p_mixed_Posts); $l_int_Index++) { +// $p_mixed_Posts[$l_int_Index] = $this->replacePostObject($p_mixed_Posts[$l_int_Index]); +// } +// } /** * Replace all Footnotes in a WP_Post object. @@ -395,7 +396,7 @@ class MCI_Footnotes_Task { $l_str_ExcerptText = substr($l_str_DummyText, 0, $l_int_MaxLength); $l_str_ExcerptText = substr($l_str_ExcerptText, 0, strrpos($l_str_ExcerptText, ' ')); // Removed hyperlink navigation on user request, but left element for style. - $l_str_ExcerptText .= ' … ' . sprintf(__("%scontinue%s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '', ''); + $l_str_ExcerptText .= ' … ' . '' . MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL) . ''; } } diff --git a/css/public.css b/css/public.css index cd5b68e..b9c8144 100755 --- a/css/public.css +++ b/css/public.css @@ -4,9 +4,9 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.0.9d3 + * Version: 2.1.0 * - * Last modified: 2020-11-08T1852+0100 + * Last modified: 2020-11-08T2150+0100 */ diff --git a/css/settings.css b/css/settings.css index 6342f5b..21663eb 100755 --- a/css/settings.css +++ b/css/settings.css @@ -4,9 +4,9 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.0.9d1 + * Version: 2.1.0 * - * Last modified: 2020-11-07T1608+0100 + * Last modified: 2020-11-08T2150+0100 */ @@ -39,9 +39,15 @@ } -input[type=text], input[type=password], textarea, select { +#footnote_inputfield_placeholder_start_user_defined, +#footnote_inputfield_placeholder_end_user_defined, +#footnote_inputfield_readon_label, +#footnote_inputfield_references_label, +#footnote_inputfield_custom_css +/*input[type=text], input[type=password], textarea, select*/ { padding-left: 8px !important; padding-right: 8px !important; + width: 80% !important; } textarea { diff --git a/footnotes.php b/footnotes.php index 72e857e..4ee0cf2 100755 --- a/footnotes.php +++ b/footnotes.php @@ -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.0.9d3 + Version: 2.1.0 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages diff --git a/readme.txt b/readme.txt index 3fd9f70..26693df 100755 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen Requires at least: 3.9 Tested up to: 5.5 Requires PHP: 5.6 -Stable Tag: 2.0.8 +Stable Tag: 2.1.0 License: GPLv3 or later License URI: http://www.gnu.org/licenses/gpl-3.0.html @@ -80,20 +80,12 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == -= 2.0.9d3 = -- BUGFIX: DISABLED the_post HOOK 2020-11-08T1839+0100 - -= 2.0.9d2 = -- Bugfix: Layout: Footnote referrers: disabled bottom border 2020-11-08T1632+0100 -- Bugfix: Libraries: Correct jQuery UI from third party, disabled from WordPress 2020-11-08T1641+0100 -- Update: Accessibility: added 'speaker-mute' class to reference container, to meet user needs - -= 2.0.9d1 = -- Bugfix: Libraries: Re-added jQuery UI from third party to look whether it can fix a broken tooltip display 2020-11-07T1604+0100 -- Bugfix: Settings layout: removed 80% width rule for input, text areas, select boxes, on user request - -= 2.0.9d0 = -- Bugfix: Layout: Footnote referrers: more efficiently disable underline unless hovered += 2.1.0 = +- Add: UI: Tooltip: made 'Continue reading' button label customizable +- Bugfix: Layout: Footnote referrers: disabled bottom border for theme compatibility +- Update: Accessibility: added 'speaker-mute' class to reference container +- Bugfix: Settings layout: added named selectors to limit applicability of styles +- UPDATE: DISABLED the_post hook, the plugin stopped supporting this hook = 2.0.8 = - BUGFIX: Priority level back to PHP_INT_MAX (need to get in touch with other plugins) diff --git a/templates/dashboard/expert-lookup.html b/templates/dashboard/expert-lookup.html index 0043f65..c24bcfe 100644 --- a/templates/dashboard/expert-lookup.html +++ b/templates/dashboard/expert-lookup.html @@ -31,11 +31,6 @@
- - - - - -
[[label-widget-text]] [[widget-text]] [[url-widget-text]]
[[label-post-object]][[post-object]][[url-post-object]]
\ No newline at end of file + diff --git a/templates/dashboard/settings-reference-container.html b/templates/dashboard/settings-reference-container.html index 37e950d..ae0e47f 100644 --- a/templates/dashboard/settings-reference-container.html +++ b/templates/dashboard/settings-reference-container.html @@ -1,5 +1,10 @@ + + + + + @@ -13,4 +18,4 @@ -
[[label-readon]][[readon]](Quick fix, will be moved to its place.)
[[label-name]] [[name]][[position]]
\ No newline at end of file + From 18305dee4f8e5ecc3b1e3c6ff868712fd6575742 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Sun, 8 Nov 2020 21:52:49 +0000 Subject: [PATCH 14/27] development version 2.1.1d0: restore jQuery UI from CDNJS / Cloudflare for Forum User git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2414868 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/init.php | 34 +++++++++++++++++----------------- css/public.css | 4 ++-- footnotes.php | 2 +- readme.txt | 3 +++ 4 files changed, 23 insertions(+), 20 deletions(-) diff --git a/class/init.php b/class/init.php index 35ca2d5..b08f45c 100644 --- a/class/init.php +++ b/class/init.php @@ -122,29 +122,29 @@ class MCI_Footnotes { // add the jQuery plugin registered by WordPress wp_enqueue_script( 'jquery' ); - // Add jQuery Tools: - wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__)); - - // Add the jQuery UI libraries registered by WordPress: - // 'no need to enqueue -core, because dependencies are set' - // Source: - wp_enqueue_script( 'jquery-ui-widget' ); - wp_enqueue_script( 'jquery-ui-mouse' ); - wp_enqueue_script( 'jquery-ui-accordion' ); - wp_enqueue_script( 'jquery-ui-autocomplete' ); - wp_enqueue_script( 'jquery-ui-slider' ); +// // Add jQuery Tools: +// wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__)); +// +// // Add the jQuery UI libraries registered by WordPress: +// // 'no need to enqueue -core, because dependencies are set' +// // Source: +// wp_enqueue_script( 'jquery-ui-widget' ); +// wp_enqueue_script( 'jquery-ui-mouse' ); +// wp_enqueue_script( 'jquery-ui-accordion' ); +// wp_enqueue_script( 'jquery-ui-autocomplete' ); +// wp_enqueue_script( 'jquery-ui-slider' ); // Should that not work, fetch jQuery UI from cdnjs.cloudflare.com: // Add jQuery UI following @vonpiernik: // : // This was enabled in Footnotes v2.0.0 through v2.0.3. - // Re-added for 2.0.9d1 to look whether it can fix a broken tooltip display. 2020-11-07T1601+0100 - //wp_register_script( 'jQueryUI', 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js', null, null, true ); - //wp_enqueue_script( 'jQueryUI' ); + // 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, true ); + wp_enqueue_script( 'jQueryUI' ); - // Add jQuery Tools and finish adding jQueryUI: 2020-11-08T1638+0100 - //wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']); + // 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']); ### STYLES @@ -154,7 +154,7 @@ class MCI_Footnotes { 'mci-footnotes-css-public', plugins_url('../css/public.css', __FILE__), '', - '2.1.0' + '2.1.1d0' ); } diff --git a/css/public.css b/css/public.css index b9c8144..a646577 100755 --- a/css/public.css +++ b/css/public.css @@ -4,9 +4,9 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.1.0 + * Version: 2.1.1d0 * - * Last modified: 2020-11-08T2150+0100 + * Last modified: 2020-11-08T2243+0100 */ diff --git a/footnotes.php b/footnotes.php index 4ee0cf2..4f0cf0c 100755 --- a/footnotes.php +++ b/footnotes.php @@ -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.1.0 + Version: 2.1.1d0 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages diff --git a/readme.txt b/readme.txt index 26693df..05ca59a 100755 --- a/readme.txt +++ b/readme.txt @@ -80,6 +80,9 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == += 2.1.1d0 +- Bugfix: Libraries: Switched jQuery UI to third party to look whether it can fix a broken tooltip display 2020-11-07T1604+0100/2020-11-08T2242+0100 + = 2.1.0 = - Add: UI: Tooltip: made 'Continue reading' button label customizable - Bugfix: Layout: Footnote referrers: disabled bottom border for theme compatibility From 6c776388c9695f5117030b7641fd47af9ed3d3cc Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Mon, 9 Nov 2020 19:09:54 +0000 Subject: [PATCH 15/27] development version 2.1.1d1: more bugfixes for Forum User git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2415401 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/init.php | 4 +- class/task.php | 22 ++-- css/public.css | 114 ++++++++++-------- footnotes.php | 2 +- readme.txt | 10 +- .../public/reference-container-body.html | 9 +- 6 files changed, 88 insertions(+), 73 deletions(-) diff --git a/class/init.php b/class/init.php index b08f45c..f0cb3ec 100644 --- a/class/init.php +++ b/class/init.php @@ -140,7 +140,7 @@ class MCI_Footnotes { // : // 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, true ); + 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' ); // Add jQuery Tools and finish adding jQueryUI: 2020-11-08T1638+0100/2020-11-08T2246+0100 @@ -154,7 +154,7 @@ class MCI_Footnotes { 'mci-footnotes-css-public', plugins_url('../css/public.css', __FILE__), '', - '2.1.1d0' + '2.1.1d1' ); } diff --git a/class/task.php b/class/task.php index 90648b4..e5abbfa 100644 --- a/class/task.php +++ b/class/task.php @@ -258,17 +258,17 @@ class MCI_Footnotes_Task { * @since 1.5.4 * @param array|WP_Post $p_mixed_Posts */ -// public function the_post(&$p_mixed_Posts) { -// // single WP_Post object received -// if (!is_array($p_mixed_Posts)) { -// $p_mixed_Posts = $this->replacePostObject($p_mixed_Posts); -// return; -// } -// // array of WP_Post objects received -// for($l_int_Index = 0; $l_int_Index < count($p_mixed_Posts); $l_int_Index++) { -// $p_mixed_Posts[$l_int_Index] = $this->replacePostObject($p_mixed_Posts[$l_int_Index]); -// } -// } + public function the_post(&$p_mixed_Posts) { + // single WP_Post object received + if (!is_array($p_mixed_Posts)) { + $p_mixed_Posts = $this->replacePostObject($p_mixed_Posts); + return; + } + // array of WP_Post objects received + for($l_int_Index = 0; $l_int_Index < count($p_mixed_Posts); $l_int_Index++) { + $p_mixed_Posts[$l_int_Index] = $this->replacePostObject($p_mixed_Posts[$l_int_Index]); + } + } /** * Replace all Footnotes in a WP_Post object. diff --git a/css/public.css b/css/public.css index a646577..ecd132b 100755 --- a/css/public.css +++ b/css/public.css @@ -4,17 +4,17 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.1.1d0 + * Version: 2.1.1d1 * - * Last modified: 2020-11-08T2243+0100 + * Last modified: 2020-11-09T1948+0100 */ -/* MCI Footnotes logo - * - * The classes with 'heading' fix display in dashboard - * See class/config.php and css/settings.css - */ +/* +MCI Footnotes logo +The classes with 'heading' fix display in dashboard +See class/config.php and css/settings.css +*/ .footnotes_logo, .footnotes_logo:hover, @@ -32,30 +32,33 @@ } /* - * Inline footnote referrers - * aka superscript footnote anchors - * - * referrer and surroundings: - * .footnote_referrer = enclosing - * .footnote_plugin_tooltip_text = inner +Inline footnote referrers +aka superscript footnote anchors + +referrer and surroundings: + .footnote_referrer = enclosing + .footnote_plugin_tooltip_text = inner */ - .footnote_referrer, - .main-content .footnote_referrer, - .footnote_plugin_tooltip_text { - text-decoration: none !important; - border-bottom: none !important; - cursor: pointer; - z-index: 1; - } - .footnote_referrer:hover, +.footnote_referrer, +.footnote_referrer:link, +.main-content .footnote_referrer, +.main-content .footnote_referrer:link, +.footnote_plugin_tooltip_text { + text-decoration: none !important; + border-bottom: none !important; + cursor: pointer; + z-index: 1; +} +.footnote_referrer:hover, .footnote_plugin_tooltip_text:hover { text-decoration: underline; font-weight: inherit; } -/* tooltip infobox - */ +/* +tooltip infobox +*/ span.footnote_tooltip { font-size: inherit; text-align: left; @@ -74,11 +77,13 @@ span.footnote_tooltip { } /* - * Footnote references container - */ +Footnote references container +reference-container.html +*/ -/* label - */ +/* +label +*/ .footnote_container_prepare { display: block !important; padding-top: 24px !important; @@ -105,32 +110,32 @@ span.footnote_tooltip { font-size: 1.5em !important; } -/* collapse button -/* fully clickable, not sign only - */ +/* +collapse button +fully clickable, not sign only +*/ .footnote_reference_container_collapse_button { cursor: pointer; padding-left: .5em; - font-size: 1.3em !important; - vertical-align: 2px; + font-size: 1.3em !important; + vertical-align: 2px; } .footnote_container_prepare > p > span:last-child a { text-decoration: none !important; } -/* table - */ +/* +table +*/ .footnote-reference-container { width: 100%; border: none; } -/* footnotes - * class footnote_plugin_link is for backcompat. - * Used in reference-container-body.html - * See - */ -.footnote_plugin_link, +/* +footnotes +reference-container-body.html +*/ .footnote_plugin_index, .footnote_plugin_text { border:none !important; @@ -138,9 +143,12 @@ span.footnote_tooltip { vertical-align: top !important; padding: 10px 6px 5px 0 !important; } -.footnote_plugin_index a, -.footnote_plugin_text a { +.footnote_plugin_link, +.footnote_plugin_link:link, +.main-content .footnote_plugin_link, +.main-content .footnote_plugin_link:link { text-decoration: none !important; + border-bottom: none !important; } .footnote_plugin_index:hover, .footnote_plugin_text a:hover { @@ -164,7 +172,9 @@ span.footnote_tooltip { width: unset; /*unset width of text column to fix site issues*/ } -/* Responsive*/ +/* +Responsive +*/ @media only screen and (max-width: 768px) { .footnote_plugin_index { max-width: 100px; @@ -172,13 +182,13 @@ span.footnote_tooltip { } /* - * Footnotes printing style rules - * - * Printing a table, browsers tend to avoid page breaks, - * but it takes a wrapper to avoid a page break before the table. - * - * UI elements - expand button, arrows - are hidden in print; - * link styling is reverted so as to not gray out referrers/numbers. +Footnotes printing style rules + +Printing a table, browsers tend to avoid page breaks, +but it takes a wrapper to avoid a page break before the table. + +UI elements - expand button, arrows - are hidden in print; +link styling is reverted so as to not gray out referrers/numbers. */ .footnote_container_wrapper { @@ -198,7 +208,7 @@ span.footnote_tooltip { color: inherit; text-decoration: none !important; } - div.post-meta-edit-link-wrapper { /* Edit button in WP2020*/ + div.post-meta-edit-link-wrapper { /*Edit button in WP2020*/ display: none; /*(added as a service)*/ } } diff --git a/footnotes.php b/footnotes.php index 4f0cf0c..07eca78 100755 --- a/footnotes.php +++ b/footnotes.php @@ -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.1.1d0 + Version: 2.1.1d1 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages diff --git a/readme.txt b/readme.txt index 05ca59a..b228e79 100755 --- a/readme.txt +++ b/readme.txt @@ -80,15 +80,19 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == += 2.1.1d1 = +- Bugfix: Libraries: jQuery UI: load in header not in footer in case it matters for fixing tooltips +- Bugfix: Layout: Ref container: Footnote numbers: disabled bottom border for theme compatibility + = 2.1.1d0 -- Bugfix: Libraries: Switched jQuery UI to third party to look whether it can fix a broken tooltip display 2020-11-07T1604+0100/2020-11-08T2242+0100 +- Bugfix: Libraries: jQuery UI: switched to third party to look whether it can fix a broken tooltip display 2020-11-07T1604+0100/2020-11-08T2242+0100 = 2.1.0 = - Add: UI: Tooltip: made 'Continue reading' button label customizable - Bugfix: Layout: Footnote referrers: disabled bottom border for theme compatibility - Update: Accessibility: added 'speaker-mute' class to reference container - Bugfix: Settings layout: added named selectors to limit applicability of styles -- UPDATE: DISABLED the_post hook, the plugin stopped supporting this hook +- UPDATE: REMOVED the_post hook, the plugin stopped supporting this hook = 2.0.8 = - BUGFIX: Priority level back to PHP_INT_MAX (need to get in touch with other plugins) @@ -101,7 +105,7 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** = 2.0.6 = - Update: Autoload / infinite scroll support thanks to @docteurfitness -- Bugfix: Layout: Footnote referrers: deleted vertical align tweaks for cross-theme and user agent compatibility +- Bugfix: Layout: Footnote referrers: deleted vertical align tweaks, for cross-theme and user agent compatibility - Bugfix: Layout: Reference container: fixed line break behavior in footnote # clusters - Bugfix: Layout: Reference container: auto-extending column to fit widest, to fix display with short note texts - Bugfix: Layout: Reference container: IDs: slightly increased left padding diff --git a/templates/public/reference-container-body.html b/templates/public/reference-container-body.html index b58a19a..eedad5c 100755 --- a/templates/public/reference-container-body.html +++ b/templates/public/reference-container-body.html @@ -1,10 +1,11 @@ [[arrow-index]][[arrow-index]] Date: Wed, 11 Nov 2020 13:24:25 +0000 Subject: [PATCH 16/27] development version 2.1.1d2 fix enqueuing in response to user git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2416626 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/init.php | 67 +++++++++++++++++++++++------------------------- css/public.css | 4 +-- css/settings.css | 4 +-- footnotes.php | 2 +- readme.txt | 3 +++ 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/class/init.php b/class/init.php index f0cb3ec..cb47e90 100644 --- a/class/init.php +++ b/class/init.php @@ -1,7 +1,7 @@ initializeDashboard(); // initialize the Plugin Task $this->initializeTask(); - + // Register all Public Stylesheets and Scripts add_action('init', array($this, 'registerPublic')); // Enqueue all Public Stylesheets and Scripts @@ -68,11 +68,11 @@ class MCI_Footnotes { * * @author Stefan Herndler * @since 1.5.0 - * + * * Edited for 1.6.5: replaced deprecated function create_function() - * + * * Contributed by Felipe Lavín Z. Thankfully acknowledged. - * + * * create_function() was deprecated in PHP 7.2: * * See also: @@ -107,55 +107,52 @@ class MCI_Footnotes { * * @author Stefan Herndler * @since 1.5.0 - * + * * Updated for v2.0.0 adding jQuery UI * 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. */ public function registerPublic() { - ### SCRIPTS + //### SCRIPTS - // add the jQuery plugin registered by WordPress + // enqueue the jQuery plugin registered by WordPress: wp_enqueue_script( 'jquery' ); -// // Add jQuery Tools: -// wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__)); -// -// // Add the jQuery UI libraries registered by WordPress: -// // 'no need to enqueue -core, because dependencies are set' -// // Source: -// wp_enqueue_script( 'jquery-ui-widget' ); -// wp_enqueue_script( 'jquery-ui-mouse' ); -// wp_enqueue_script( 'jquery-ui-accordion' ); -// wp_enqueue_script( 'jquery-ui-autocomplete' ); -// wp_enqueue_script( 'jquery-ui-slider' ); + // 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: + wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__)); - // Should that not work, fetch jQuery UI from cdnjs.cloudflare.com: - // Add jQuery UI following @vonpiernik: + // 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 - 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' ); - + //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 - wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']); + //wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), ['jQueryUI']); - - ### STYLES - - // IMPORTANT: up-to-date plugin version number NEEDED for cache busting: + + //### STYLES + + // IMPORTANT: up-to-date plugin version number NEEDED FOR CACHE BUSTING: wp_enqueue_style( 'mci-footnotes-css-public', plugins_url('../css/public.css', __FILE__), '', - '2.1.1d1' + '2.1.1d2' ); } - + } diff --git a/css/public.css b/css/public.css index ecd132b..65c64ba 100755 --- a/css/public.css +++ b/css/public.css @@ -4,9 +4,9 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.1.1d1 + * Version: 2.1.1d2 * - * Last modified: 2020-11-09T1948+0100 + * Last modified: 2020-11-11T1402+0100 */ diff --git a/css/settings.css b/css/settings.css index 21663eb..eecba5e 100755 --- a/css/settings.css +++ b/css/settings.css @@ -4,9 +4,9 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.1.0 + * Version: 2.1.1d2 * - * Last modified: 2020-11-08T2150+0100 + * Last modified: 2020-11-11T1402+0100 */ diff --git a/footnotes.php b/footnotes.php index 07eca78..5df0cd2 100755 --- a/footnotes.php +++ b/footnotes.php @@ -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.1.1d1 + Version: 2.1.1d2 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages diff --git a/readme.txt b/readme.txt index b228e79..00c3a8a 100755 --- a/readme.txt +++ b/readme.txt @@ -80,6 +80,9 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == += 2.1.1d2 = +- Bugfix: Libraries: jQuery UI: properly pick the libraries registered by WordPress needed for tooltips + = 2.1.1d1 = - Bugfix: Libraries: jQuery UI: load in header not in footer in case it matters for fixing tooltips - Bugfix: Layout: Ref container: Footnote numbers: disabled bottom border for theme compatibility From 5a8e30e6ea17b61e5c7dfed73ec2c850832b95b0 Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Wed, 11 Nov 2020 20:49:44 +0000 Subject: [PATCH 17/27] development version 2.1.1d3 with experimental optional alternative tooltip implementation in response to user git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2416861 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/dashboard/subpage-main.php | 3 + class/init.php | 2 +- class/settings.php | 104 ++++++++++-------- class/task.php | 25 +++-- css/public.css | 71 ++++++++---- css/settings.css | 4 +- footnotes.php | 2 +- readme.txt | 3 + .../dashboard/customize-mouse-over-box.html | 6 +- templates/public/footnote-alternative.html | 16 +++ templates/public/footnote.html | 17 ++- 11 files changed, 163 insertions(+), 90 deletions(-) create mode 100644 templates/public/footnote-alternative.html diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php index f199964..645b8a2 100644 --- a/class/dashboard/subpage-main.php +++ b/class/dashboard/subpage-main.php @@ -322,6 +322,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine { "label-enable" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __("Enable the mouse-over box", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_Enabled), + "label-alternative" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __("Use alternative tooltip implementation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), + "alternative" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, $l_arr_Enabled), + "label-activate-excerpt" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __("Display only an excerpt", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "activate-excerpt" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_Enabled), diff --git a/class/init.php b/class/init.php index cb47e90..76d346a 100644 --- a/class/init.php +++ b/class/init.php @@ -151,7 +151,7 @@ class MCI_Footnotes { 'mci-footnotes-css-public', plugins_url('../css/public.css', __FILE__), '', - '2.1.1d2' + '2.1.1d3' ); } diff --git a/class/settings.php b/class/settings.php index eaa242f..7d09b00 100644 --- a/class/settings.php +++ b/class/settings.php @@ -10,6 +10,7 @@ * v2.0.4 2020-11-02T2115+0100 * v2.0.7 2020-11-06T1342+0100 * v2.1.0 2020-11-08T2149+0100 + * V2.2.0 2020-11-11T1819+0100 ######## set to '' line 416 before release! ###################### */ @@ -28,8 +29,8 @@ class MCI_Footnotes_Settings { * * @since 2.0.9 * @var string - * - * 2020-11-08T2106+0100 + * + * 2020-11-08T2106+0100 */ const C_STR_FOOTNOTES_TOOLTIP_READON_LABEL = "footnote_inputfield_readon_label"; @@ -168,6 +169,16 @@ class MCI_Footnotes_Settings { */ const C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED = "footnote_inputfield_custom_mouse_over_box_enabled"; + /** + * Settings Container Key for alternative tooltip implementation + * + * @since 2.2.0 + * @var string + * + * 2020-11-11T1817+0100 + */ + const C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE = "footnote_inputfield_custom_mouse_over_box_alternative"; + /** * Settings Container Key for the mouse-over box to display only an excerpt. * @@ -393,57 +404,58 @@ class MCI_Footnotes_Settings { self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'no' ), "footnotes_storage_custom" => array( - - // The default footnote referrer surroundings should be square brackets: - // * as in English typesetting; - // * for better UX thanks to a more button-like appearance; - // * for stylistic consistency with the expand-collapse button - self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', - self::C_STR_FOOTNOTES_STYLING_AFTER => ']', - - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', - - // The mouse over content truncation should be enabled by default - // to raise awareness of the functionality and to prevent the screen - // from being filled at mouse-over, and to allow the Continue reading: - self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', - - // The truncation length is raised from 150 to 200 chars: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, - - // The default position should not be lateral because of the risk - // the box gets squeezed between note anchor at line end and window edge, - // and top because reading at the bottom of the window is more likely: - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', - - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, - // The vertical offset must be negative for the box not to cover - // the current line of text (web coordinates origin is top left): - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, - - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', - // The mouse over box shouldn’t feature a colored background - // by default, due to diverging user preferences. White is neutral: - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', - + + // The default footnote referrer surroundings should be square brackets: + // * as in English typesetting; + // * for better UX thanks to a more button-like appearance; + // * for stylistic consistency with the expand-collapse button + self::C_STR_FOOTNOTES_STYLING_BEFORE => '[', + self::C_STR_FOOTNOTES_STYLING_AFTER => ']', + + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes', + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'yes', + + // The mouse over content truncation should be enabled by default + // to raise awareness of the functionality and to prevent the screen + // from being filled at mouse-over, and to allow the Continue reading: + self::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes', + + // The truncation length is raised from 150 to 200 chars: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200, + + // The default position should not be lateral because of the risk + // the box gets squeezed between note anchor at line end and window edge, + // and top because reading at the bottom of the window is more likely: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center', + + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0, + // The vertical offset must be negative for the box not to cover + // the current line of text (web coordinates origin is top left): + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, + + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', + // The mouse over box shouldn’t feature a colored background + // by default, due to diverging user preferences. White is neutral: + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff', + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH => 1, - self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99', - - // The mouse over box corners mustn’t be rounded as that is outdated: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, - - // The width should be limited to start with, for the box to have shape: - self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, - + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99', + + // The mouse over box corners mustn’t be rounded as that is outdated: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0, + + // The width should be limited to start with, for the box to have shape: + self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450, + self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666', self::C_STR_HYPERLINK_ARROW => '↑', self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '', self::C_STR_CUSTOM_CSS => '' ), - // These should all be enabled by default to prevent users from - // thinking at first that the feature is broken in post titles. + // These should all be enabled by default to prevent users from + // thinking at first that the feature is broken in post titles. // See - // In titles, footnotes are functionally pointless in WordPress. + // In titles, footnotes are functionally pointless in WordPress. "footnotes_storage_expert" => array( self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => 'yes', self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'yes', diff --git a/class/task.php b/class/task.php index e5abbfa..3a04954 100644 --- a/class/task.php +++ b/class/task.php @@ -120,7 +120,7 @@ class MCI_Footnotes_Task { - +get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE))) { + echo '\r\n"; + }; } /** @@ -353,7 +359,11 @@ class MCI_Footnotes_Task { if (!$p_bool_HideFootnotesText) { // load template file - $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote"); + if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE))) { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote-alternative"); + } else { + $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "footnote"); + } $l_obj_TemplateTooltip = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "tooltip"); } else { $l_obj_Template = null; @@ -395,8 +405,7 @@ class MCI_Footnotes_Task { if (is_int($l_int_MaxLength) && strlen($l_str_DummyText) > $l_int_MaxLength) { $l_str_ExcerptText = substr($l_str_DummyText, 0, $l_int_MaxLength); $l_str_ExcerptText = substr($l_str_ExcerptText, 0, strrpos($l_str_ExcerptText, ' ')); - // Removed hyperlink navigation on user request, but left element for style. - $l_str_ExcerptText .= ' … ' . '' . MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL) . ''; + $l_str_ExcerptText .= ' … ' . '' . MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL) . ''; } } @@ -429,7 +438,9 @@ class MCI_Footnotes_Task { "offset-x" => !empty($l_int_OffsetX) ? $l_int_OffsetX : 0 ) ); - $l_str_FootnoteReplaceText .= $l_obj_TemplateTooltip->getContent(); + if (!MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE))) { + $l_str_FootnoteReplaceText .= $l_obj_TemplateTooltip->getContent(); + } $l_obj_TemplateTooltip->reload(); } } diff --git a/css/public.css b/css/public.css index 65c64ba..8f14bec 100755 --- a/css/public.css +++ b/css/public.css @@ -4,16 +4,18 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.1.1d2 + * Version: 2.1.1d3 * - * Last modified: 2020-11-11T1402+0100 + * Last modified: 2020-11-11T2146+0100 */ -/* +/*‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ MCI Footnotes logo The classes with 'heading' fix display in dashboard -See class/config.php and css/settings.css + +class/config.php +css/settings.css */ .footnotes_logo, @@ -31,54 +33,77 @@ See class/config.php and css/settings.css color: #545f5a; } -/* -Inline footnote referrers -aka superscript footnote anchors +/*‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +Footnote referrers and tooltips -referrer and surroundings: - .footnote_referrer = enclosing - .footnote_plugin_tooltip_text = inner - */ +templates/public/footnote.html +templates/public/footnote-alternative.html + +.footnote_referrer = enclosing +.footnote_plugin_tooltip_text = inner +.footnote_tooltip = inner +*/ .footnote_referrer, +.footnote_referrer a, .footnote_referrer:link, +.footnote_referrer a:link, .main-content .footnote_referrer, +.main-content .footnote_referrer a, .main-content .footnote_referrer:link, +.main-content .footnote_referrer a:link, .footnote_plugin_tooltip_text { text-decoration: none !important; border-bottom: none !important; cursor: pointer; - z-index: 1; } .footnote_referrer:hover, +.footnote_referrer a:hover, .footnote_plugin_tooltip_text:hover { text-decoration: underline; font-weight: inherit; } -/* -tooltip infobox -*/ -span.footnote_tooltip { - font-size: inherit; +.footnote_tooltip { + display: none; + z-index: 999; text-align: left; + padding: 12px; line-height: 1.2em; - z-index: 99; + font-size: inherit; + font-weight: normal; + font-style: normal; } -.continue { + +.footnote_relative { + position: relative; +} +.footnote_tooltip_alternative { + position: absolute; + bottom: 24px; + left: -50px; + width: 400px; +} + +/* +Read-on button +*/ +.footnote_tooltip_continue { font-style: italic; color: green; text-decoration: none !important; cursor: pointer; } -.continue:hover { +.footnote_tooltip_continue:hover { color: blue; text-decoration: underline !important; } -/* + +/*‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ Footnote references container -reference-container.html + +templates/public/reference-container.html */ /* @@ -181,7 +206,7 @@ Responsive } } -/* +/*‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ Footnotes printing style rules Printing a table, browsers tend to avoid page breaks, diff --git a/css/settings.css b/css/settings.css index eecba5e..b6c0cac 100755 --- a/css/settings.css +++ b/css/settings.css @@ -4,9 +4,9 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.1.1d2 + * Version: 2.1.1d3 * - * Last modified: 2020-11-11T1402+0100 + * Last modified: 2020-11-11T2145+0100 */ diff --git a/footnotes.php b/footnotes.php index 5df0cd2..2a8c5ec 100755 --- a/footnotes.php +++ b/footnotes.php @@ -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.1.1d2 + Version: 2.1.1d3 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages diff --git a/readme.txt b/readme.txt index 00c3a8a..417f621 100755 --- a/readme.txt +++ b/readme.txt @@ -80,6 +80,9 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest** == Changelog == += 2.1.1d3 = +- Add: UI: Tooltips: experimental optional alternative CSS/JS implementation + = 2.1.1d2 = - Bugfix: Libraries: jQuery UI: properly pick the libraries registered by WordPress needed for tooltips diff --git a/templates/dashboard/customize-mouse-over-box.html b/templates/dashboard/customize-mouse-over-box.html index a1c26d3..e678bb6 100644 --- a/templates/dashboard/customize-mouse-over-box.html +++ b/templates/dashboard/customize-mouse-over-box.html @@ -4,6 +4,10 @@ [[label-enable]] [[enable]] + + [[label-alternative]] + [[alternative]] + [[label-activate-excerpt]] [[activate-excerpt]] @@ -53,4 +57,4 @@ [[box-shadow-color]] [[notice-box-shadow-color]] - \ No newline at end of file + diff --git a/templates/public/footnote-alternative.html b/templates/public/footnote-alternative.html new file mode 100644 index 0000000..d94aa22 --- /dev/null +++ b/templates/public/footnote-alternative.html @@ -0,0 +1,16 @@ +[[before]][[index]][[after]][[text]] diff --git a/templates/public/footnote.html b/templates/public/footnote.html index 421a5df..b146176 100755 --- a/templates/public/footnote.html +++ b/templates/public/footnote.html @@ -1,14 +1,13 @@ -[[before]][[index]][[after]] -[[text]][[text]] From 9d0044a35a2f6d0e0c9295284c5b0869b34ef2da Mon Sep 17 00:00:00 2001 From: pewgeuges <73141620+pewgeuges@users.noreply.github.com> Date: Thu, 12 Nov 2020 04:46:44 +0000 Subject: [PATCH 18/27] development version 2.1.1d4: redacted (commented out) jQuery.browser function use in jquery.tools.min.js, updating for the Forum in response to user git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2416961 b8457f37-d9ea-0310-8a92-e5e31aec5664 --- class/init.php | 2 +- css/public.css | 4 ++-- css/settings.css | 4 ++-- footnotes.php | 2 +- js/jquery.tools.min.js | 42 +++++++++++++++++++++++++---------- readme.txt | 4 ++++ templates/public/tooltip.html | 1 + 7 files changed, 41 insertions(+), 18 deletions(-) diff --git a/class/init.php b/class/init.php index 76d346a..3f67ff7 100644 --- a/class/init.php +++ b/class/init.php @@ -151,7 +151,7 @@ class MCI_Footnotes { 'mci-footnotes-css-public', plugins_url('../css/public.css', __FILE__), '', - '2.1.1d3' + '2.1.1d4' ); } diff --git a/css/public.css b/css/public.css index 8f14bec..d45198f 100755 --- a/css/public.css +++ b/css/public.css @@ -4,9 +4,9 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.1.1d3 + * Version: 2.1.1d4 * - * Last modified: 2020-11-11T2146+0100 + * Last modified: 2020-11-12T0539+0100 */ diff --git a/css/settings.css b/css/settings.css index b6c0cac..55a9800 100755 --- a/css/settings.css +++ b/css/settings.css @@ -4,9 +4,9 @@ * Created-Date: 15.05.14 * Created-Time: 16:21 * Since: 1.0 - * Version: 2.1.1d3 + * Version: 2.1.1d4 * - * Last modified: 2020-11-11T2145+0100 + * Last modified: 2020-11-12T0539+0100 */ diff --git a/footnotes.php b/footnotes.php index 2a8c5ec..834fc74 100755 --- a/footnotes.php +++ b/footnotes.php @@ -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.1.1d3 + Version: 2.1.1d4 Author URI: http://cheret.de/plugins/footnotes-2/ Text Domain: footnotes Domain Path: /languages diff --git a/js/jquery.tools.min.js b/js/jquery.tools.min.js index 885fb3b..d34b477 100644 --- a/js/jquery.tools.min.js +++ b/js/jquery.tools.min.js @@ -21,20 +21,40 @@ * * ----- * - * Added jQueryUI and checks whether a.browser exists + * Added jQueryUI and checks whether jQuery.browser exists * Following @vonpiernik * 2020-10-26T2005+0100 - * Last modified: 2020-10-26T2006+0100 + * + * Removed usage of jQuery browser check function 2020-11-12T0127+0100 + * ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ + * See also on the Forum, lastly + * + * #1 (54) This was only a tweak to adjust width and height in Internet Explorer. + * + * #2 (226) This was only for very old Internet Explorer (older than IE8). + * + * #3 (266) This was only about a naming convention of Firefox: 'DOMMouseScroll' vs 'mousewheel', + * or 'mousemove' in very old Firefox (older than v1.9). + * When making jQuery.browser optional, an 'if(a.browser)' condition was added around. + * + * #4 (293) This disabled fade-in for Internet Explorer other than FadeIE. + * + * #5 (296) This disabled fade-out for Internet Explorer other than FadeIE. + * + * #6 (420) This disabled slide-fade for Internet Explorer. + * Browsers not supporting an effect simply don’t execute it, they won’t throw an error. + * + * Last modified: 2020-11-12T0537+0100 */ (function (a) { a.tools = a.tools || {version: "v1.2.7"}; var b; b = a.tools.expose = {conf: {maskId: "exposeMask", loadSpeed: "slow", closeSpeed: "fast", closeOnClick: !0, closeOnEsc: !0, zIndex: 9998, opacity: .8, startOpacity: 0, color: "#fff", onLoad: null, onClose: null}}; function c() { - if (a.browser && a.browser.msie) { + /*if (a.browser && a.browser.msie) { var b = a(document).height(), c = a(window).height(); return[window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, b - c < 20 ? c : b] - } + }*/ return[a(document).width(), a(document).height()] } @@ -203,10 +223,10 @@ (function (a) { var b, c, d, e; a.tools = a.tools || {version: "v1.2.7"}, a.tools.history = {init: function (g) { - e || (a.browser && a.browser.msie && a.browser.version < "8" ? c || (c = a("