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] =?UTF-8?q?delta=200=20for=20next=20release:=20v2.0.7d0=20?=
=?UTF-8?q?commit=20as=20dev=20version=20needed=20to=20respond=20on=20foru?=
=?UTF-8?q?m.=20(v2.0.6=20has=20been=20diffed=20against=202.0.4=20and=20as?=
=?UTF-8?q?sessed,=20could=20be=20kept=20in=20production=20as=20well=20giv?=
=?UTF-8?q?en=202.0.4=20is=20okay.)=20Hooks=20default=20status=20reset=20t?=
=?UTF-8?q?o=20previous,=20in=20case=20that=20matters=20(doesn=E2=80=99t?=
=?UTF-8?q?=20on=20my=20WordPress).=20PROBLEM=20WITH=20UNRESPONSIVE=20POSI?=
=?UTF-8?q?TION=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