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 +