stable bugfix release 2.1.2: priority level settings for all other hooks, preventing them from being zeroed at save == URGENCY
git-svn-id: https://plugins.svn.wordpress.org/footnotes/tags/2.1.2@2421553 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
362d9e60c6
commit
65668e0754
28 changed files with 1479 additions and 728 deletions
|
@ -89,7 +89,8 @@ class MCI_Footnotes_Layout_Init {
|
|||
* Registers all sub menu pages for the new main menu.
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 2.0.2
|
||||
* @since 1.5.0
|
||||
* Claimed it was added for 2.0.2 while already present since 1.5.0 2020-11-19T1201+0100
|
||||
* @see http://codex.wordpress.org/Function_Reference/add_menu_page
|
||||
*/
|
||||
public function registerMainMenu() {
|
||||
|
@ -209,4 +210,4 @@ class MCI_Footnotes_Layout_Init {
|
|||
);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
* @filesource
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0 12.09.14 10:56
|
||||
*
|
||||
* Updated for 2.1.2 added version # of settings.css for cache busting
|
||||
* ############ update line 200 after changes to settings.css
|
||||
* Last modified 2020-11-19T1456+0100
|
||||
*/
|
||||
|
||||
|
||||
|
@ -194,9 +198,20 @@ abstract class MCI_Footnotes_LayoutEngine {
|
|||
// add WordPress color picker layout
|
||||
wp_enqueue_style('wp-color-picker');
|
||||
// add WordPress color picker function
|
||||
wp_enqueue_script('wp-color-picker');
|
||||
wp_enqueue_script('wp-color-picker');
|
||||
|
||||
|
||||
// register stylesheet
|
||||
wp_register_style('mci-footnotes-admin-styles', plugins_url('../../css/settings.css', __FILE__));
|
||||
// added version after changes started to settings.css from 2.1.2 on:
|
||||
wp_register_style(
|
||||
'mci-footnotes-admin-styles',
|
||||
plugins_url('../../css/settings.css', __FILE__),
|
||||
'',
|
||||
'2.1.2'
|
||||
);
|
||||
// UPDATE version # when making changes to settings.css, FOR CACHE BUSTING
|
||||
|
||||
|
||||
// add stylesheet to the output
|
||||
wp_enqueue_style('mci-footnotes-admin-styles');
|
||||
}
|
||||
|
@ -484,4 +499,4 @@ abstract class MCI_Footnotes_LayoutEngine {
|
|||
$l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"], $p_in_Min, $p_int_Max);
|
||||
}
|
||||
|
||||
} // end of class
|
||||
} // end of class
|
||||
|
|
|
@ -6,7 +6,12 @@
|
|||
* @author Stefan Herndler
|
||||
* @since 1.5.0 14.09.14 14:47
|
||||
*
|
||||
* Edited for v2.0.4 2020-11-01T0509+0100
|
||||
* Edited for:
|
||||
* 2.0.4 2020-11-01T0509+0100
|
||||
* 2.1.0 2020-11-08T2148+0100
|
||||
* 2.1.1 2020-11-16T2152+0100
|
||||
*
|
||||
* Last modified: 2020-11-16T2152+0100
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -80,7 +85,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
*/
|
||||
protected function getMetaBoxes() {
|
||||
return array(
|
||||
// Change string "%s styling" to "Footnotes styling":
|
||||
// Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5:
|
||||
$this->addMetaBox("settings", "styling", __("Footnotes styling", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Styling"),
|
||||
$this->addMetaBox("settings", "reference-container", __("References Container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "ReferenceContainer"),
|
||||
// Leave intact since this is not localized:
|
||||
|
@ -113,6 +118,11 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
"post_end" => __("at the end of the post", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"widget" => __("in the widget area", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
|
||||
);
|
||||
// options for Yes/No select box:
|
||||
$l_arr_Enabled = array(
|
||||
"yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
|
||||
);
|
||||
|
||||
// load template file
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-reference-container");
|
||||
|
@ -123,7 +133,19 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
"name" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME),
|
||||
|
||||
"label-collapse" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, __("Collapse references by default", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"collapse" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE),
|
||||
"collapse" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, $l_arr_Enabled),
|
||||
|
||||
"label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __("Display a backlink symbol", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"symbol" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_Enabled),
|
||||
|
||||
"label-startpage" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE, __("Display on start page too", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"startpage" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE, $l_arr_Enabled),
|
||||
|
||||
"label-3column" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __("Three-column layout", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"3column" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_Enabled),
|
||||
|
||||
"label-switch" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __("Symbol appended, not prepended", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"switch" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_Enabled),
|
||||
|
||||
"label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __("Where shall the reference container appear", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_Positions)
|
||||
|
@ -242,7 +264,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
* @since 1.5.0
|
||||
*/
|
||||
public function Other() {
|
||||
// options for the Footnotes to be replaced in excerpt
|
||||
// options for Yes/No select box:
|
||||
$l_arr_Enabled = array(
|
||||
"yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
|
||||
|
@ -270,11 +292,19 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
* @since 1.5.0
|
||||
*/
|
||||
public function Superscript() {
|
||||
// options for Yes/No select box:
|
||||
$l_arr_Enabled = array(
|
||||
"yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
|
||||
);
|
||||
// load template file
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-superscript");
|
||||
// replace all placeholders
|
||||
$l_obj_Template->replace(
|
||||
array(
|
||||
"label-superscript" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __("Enable superscript for footnote referrers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"superscript" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, $l_arr_Enabled),
|
||||
|
||||
"label-before" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __("Before Footnotes index", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"before" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE),
|
||||
|
||||
|
@ -293,7 +323,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
* @since 1.5.2
|
||||
*/
|
||||
public function MouseOverBox() {
|
||||
// options for the Footnotes to be replaced in excerpt
|
||||
// options for Yes/No select box:
|
||||
$l_arr_Enabled = array(
|
||||
"yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
|
||||
|
@ -317,12 +347,18 @@ 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),
|
||||
|
||||
"label-excerpt-length" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __("Maximum characters for the excerpt", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"excerpt-length" => $this->addTextBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH),
|
||||
|
||||
"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-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, __("Position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_Position),
|
||||
|
||||
|
@ -375,8 +411,10 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
* @since 1.5.0
|
||||
*
|
||||
* Edited heading for v2.0.4
|
||||
* The former 'hyperlink arrow' became 'prepended arrow' in v2.0.3 after
|
||||
* a user complaint about missing backlinking semantics of the footnote number.
|
||||
*
|
||||
* The former 'hyperlink arrow', incompatible with combined identical footnotes,
|
||||
* became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics
|
||||
* of the footnote number.
|
||||
*/
|
||||
public function HyperlinkArrow() {
|
||||
// load template file
|
||||
|
@ -435,40 +473,56 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.5
|
||||
*
|
||||
* Edited for:
|
||||
* 2.1.1 add priority level setting for the_content 2020-11-16T2152+0100
|
||||
* 2.2.0 add priority level settings for the other hooks 2020-11-19T1421+0100
|
||||
*/
|
||||
public function lookupHooks() {
|
||||
// load template file
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "expert-lookup");
|
||||
|
||||
// replace all placeholders
|
||||
// priority level was initially hard-coded default
|
||||
// shows "9223372036854775807" in the numbox
|
||||
// empty should be interpreted as PHP_INT_MAX,
|
||||
// but a numbox cannot be set to empty: <https://github.com/Modernizr/Modernizr/issues/171>
|
||||
// define -1 as PHP_INT_MAX instead
|
||||
|
||||
$l_obj_Template->replace(
|
||||
array(
|
||||
|
||||
"description" => __("The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features. Default 9223372036854775807 or -1 is lowest priority, 0 is highest. For the reference container to sit above related posts, the priority level of the_content hook may need to be at most 1200. For Footnotes to work when a glossary plugin is active, a higher priority of 1000 may be needed. Another priority level for the_content with proven efficiency is 10.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
|
||||
"head-hook" => __("WordPress hook function name", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"head-checkbox" => __("Activate", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"head-numbox" => __("Priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"head-url" => __("WordPress documentation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
|
||||
"label-the-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE, "the_title"),
|
||||
"the-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_TITLE),
|
||||
"url-the-title" => "http://codex.wordpress.org/Plugin_API/Filter_Reference/the_title",
|
||||
"priority-the-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX),
|
||||
"url-the-title" => "https://developer.wordpress.org/reference/hooks/the_title/",
|
||||
|
||||
"label-the-content" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT, "the_content"),
|
||||
"the-content" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT),
|
||||
"url-the-content" => "http://codex.wordpress.org/Plugin_API/Filter_Reference/the_content",
|
||||
|
||||
"priority-the-content" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, -1, PHP_INT_MAX),
|
||||
"url-the-content" => "https://developer.wordpress.org/reference/hooks/the_content/",
|
||||
|
||||
"label-the-excerpt" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT, "the_excerpt"),
|
||||
"the-excerpt" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_EXCERPT),
|
||||
"url-the-excerpt" => "http://codex.wordpress.org/Function_Reference/the_excerpt",
|
||||
|
||||
"priority-the-excerpt" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL, -1, PHP_INT_MAX),
|
||||
"url-the-excerpt" => "https://developer.wordpress.org/reference/functions/the_excerpt/",
|
||||
|
||||
"label-widget-title" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE, "widget_title"),
|
||||
"widget-title" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE),
|
||||
"url-widget-title" => "http://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title",
|
||||
|
||||
"priority-widget-title" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL, -1, PHP_INT_MAX),
|
||||
"url-widget-title" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_title",
|
||||
|
||||
"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"
|
||||
"priority-widget-text" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL, -1, PHP_INT_MAX),
|
||||
"url-widget-text" => "https://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text",
|
||||
)
|
||||
);
|
||||
// display template with replaced placeholders
|
||||
|
|
103
class/init.php
103
class/init.php
|
@ -1,18 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* Includes the main Class of the Plugin.
|
||||
*
|
||||
* IMPORTANT: In registerPublic(), 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 v2.0.0: Added jQueryUI from CDN 2020-10-26T1907+0100
|
||||
*
|
||||
* Edited for v1.6.5: Replaced deprecated function create_function()
|
||||
* 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
|
||||
*
|
||||
* Last modified: 2020-11-05T0638+0100
|
||||
*
|
||||
* Continual update of version number.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -46,12 +49,12 @@ class MCI_Footnotes {
|
|||
MCI_Footnotes_WYSIWYG::registerHooks();
|
||||
// register general hooks
|
||||
MCI_Footnotes_Hooks::registerHooks();
|
||||
|
||||
|
||||
// initialize the Plugin Dashboard
|
||||
$this->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
|
||||
|
@ -65,14 +68,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:
|
||||
* <https://wordpress.org/support/topic/deprecated-in-php-7-2-function-create_function-is-deprecated/>
|
||||
* See also: <https://wordpress.org/support/topic/deprecated-function-create_function-14/>
|
||||
*
|
||||
* 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:
|
||||
* <https://wordpress.org/support/topic/deprecated-in-php-7-2-function-create_function-is-deprecated/>
|
||||
* See also: <https://wordpress.org/support/topic/deprecated-function-create_function-14/>
|
||||
*/
|
||||
public function initializeWidgets() {
|
||||
register_widget("MCI_Footnotes_Widget_ReferenceContainer");
|
||||
|
@ -104,28 +107,60 @@ 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:
|
||||
* <https://wordpress.org/support/topic/gdpr-issue-with-jquery/>
|
||||
* See <https://wordpress.stackexchange.com/questions/273986/correct-way-to-enqueue-jquery-ui>
|
||||
*
|
||||
*
|
||||
* jQueryUI re-enables the tooltip infobox disabled when WPv5.5 was released.
|
||||
*/
|
||||
public function registerPublic() {
|
||||
|
||||
// add the jQuery plugin (already registered by WordPress)
|
||||
wp_enqueue_script( 'jquery' );
|
||||
// Add jQueryUI: 'no need to enqueue -core, because dependencies are set'
|
||||
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__));
|
||||
|
||||
// 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');
|
||||
|
||||
//### SCRIPTS
|
||||
|
||||
// These are only enqueued if the jQuery tooltips are enabled.
|
||||
// If alternative tooltips are enabled, these libraries are not needed.
|
||||
// Scroll animation doesn’t seem to need even jQuery Core or it gets it from elsewhere.
|
||||
|
||||
if (!MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE))) {
|
||||
|
||||
// enqueue the jQuery plugin registered by WordPress:
|
||||
wp_enqueue_script( 'jquery' );
|
||||
|
||||
// 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: redacted jQuery.browser, completed minification; added versioning 2020-11-18T2150+0100
|
||||
wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), '', '2.1.1');
|
||||
|
||||
|
||||
// Alternatively, fetch jQuery UI from cdnjs.cloudflare.com:
|
||||
// Used to add jQuery UI following @vonpiernik:
|
||||
// <https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13456762>:
|
||||
// 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' );
|
||||
// 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']);
|
||||
|
||||
}
|
||||
|
||||
|
||||
//### 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.2'
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -5,14 +5,26 @@
|
|||
* @filesource
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0 14.09.14 10:43
|
||||
*
|
||||
* Edited for v2.0.4 2020-11-02T2115+0100
|
||||
*
|
||||
* Edited for:
|
||||
* 2.0.4 restore arrow settings 2020-11-02T2115+0100
|
||||
* 2.0.7 remove hook the_post 2020-11-06T1342+0100
|
||||
* 2.1.0 add read-on button label customization 2020-11-08T2149+0100
|
||||
* 2.1.1 fix tooltips on site by alternative 2020-11-11T1819+0100
|
||||
* 2.1.1 fix disabling backlink symbol 2020-11-16T2021+0100
|
||||
* 2.1.1 fix superscript by making it optional
|
||||
* 2.1.1 fix start pages by option to hide ref container
|
||||
* 2.1.1 fix ref container by option restoring 3-column layout
|
||||
* 2.1.1 fix ref container by option to switch index/symbol 2020-11-16T2022+0100
|
||||
* 2.1.1 fix ref container positioning by priority level 2020-11-17T0205+0100
|
||||
*
|
||||
* Last modified: 2020-11-17T0311+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
|
||||
|
@ -20,6 +32,11 @@
|
|||
*/
|
||||
class MCI_Footnotes_Settings {
|
||||
|
||||
|
||||
/**
|
||||
* SETTINGS CONTAINER KEY DEFINITIONS
|
||||
*/
|
||||
|
||||
/**
|
||||
* Settings Container Key for the label of the reference container.
|
||||
*
|
||||
|
@ -155,6 +172,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.
|
||||
*
|
||||
|
@ -165,7 +192,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
|
||||
|
@ -336,13 +363,37 @@ 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.
|
||||
* Settings Container Key for the label of the 'Read on' button in truncated tooltips
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.5
|
||||
* @since 2.1.0
|
||||
* @var string
|
||||
*
|
||||
* 2020-11-08T2106+0100
|
||||
*/
|
||||
const C_BOOL_EXPERT_LOOKUP_THE_POST = "footnote_inputfield_expert_lookup_the_post";
|
||||
const C_STR_FOOTNOTES_TOOLTIP_READON_LABEL = "footnote_inputfield_readon_label";
|
||||
|
||||
/**
|
||||
* Settings Container Keys of options fixing default layout
|
||||
*
|
||||
* @since 2.1.1
|
||||
* @var string
|
||||
*
|
||||
* 2020-11-16T0859+0100
|
||||
*/
|
||||
const C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS = "footnotes_inputfield_referrer_superscript_tags";
|
||||
|
||||
const C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE = "footnotes_inputfield_reference_container_backlink_symbol_enable";
|
||||
const C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE = "footnotes_inputfield_reference_container_start_page_enable";
|
||||
const C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE = "footnotes_inputfield_reference_container_3column_layout_enable";
|
||||
const C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH = "footnotes_inputfield_reference_container_backlink_symbol_switch";
|
||||
|
||||
const C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL = "footnote_inputfield_expert_lookup_the_title_priority_level";
|
||||
const C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL = "footnote_inputfield_expert_lookup_the_content_priority_level";
|
||||
const C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL = "footnote_inputfield_expert_lookup_the_excerpt_priority_level";
|
||||
const C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL = "footnote_inputfield_expert_lookup_widget_title_priority_level";
|
||||
const C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL = "footnote_inputfield_expert_lookup_widget_text_priority_level";
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Stores a singleton reference of this class.
|
||||
|
@ -370,14 +421,22 @@ class MCI_Footnotes_Settings {
|
|||
* @var array
|
||||
*/
|
||||
private $a_arr_Default = array(
|
||||
|
||||
"footnotes_storage" => array(
|
||||
|
||||
self::C_STR_REFERENCE_CONTAINER_NAME => 'References',
|
||||
self::C_BOOL_REFERENCE_CONTAINER_COLLAPSE => '',
|
||||
self::C_STR_REFERENCE_CONTAINER_POSITION => 'post_end',
|
||||
// Identical footnotes should not be combined by default
|
||||
// Identical footnotes should not be combined by default
|
||||
// as long as the feature raises criticism for malfunctioning:
|
||||
// <https://wordpress.org/support/topic/too-many-errors-18/>
|
||||
self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => '',
|
||||
|
||||
self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes',
|
||||
self::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes',
|
||||
self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => '',
|
||||
self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => '',
|
||||
|
||||
self::C_STR_FOOTNOTES_SHORT_CODE_START => '((',
|
||||
self::C_STR_FOOTNOTES_SHORT_CODE_END => '))',
|
||||
self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '',
|
||||
|
@ -386,37 +445,89 @@ class MCI_Footnotes_Settings {
|
|||
self::C_STR_FOOTNOTES_LOVE => 'no',
|
||||
self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'yes',
|
||||
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_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading',
|
||||
|
||||
self::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes',
|
||||
|
||||
// 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_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_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => '',
|
||||
|
||||
// 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 => '',
|
||||
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#fff7a7',
|
||||
// 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,
|
||||
|
||||
// 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.
|
||||
// See <https://wordpress.org/support/topic/more-feature-ideas/>
|
||||
|
||||
"footnotes_storage_expert" => array(
|
||||
self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => 'yes',
|
||||
|
||||
// Titles should all be enabled by default to prevent users from
|
||||
// thinking at first that the feature is broken in post titles.
|
||||
// See <https://wordpress.org/support/topic/more-feature-ideas/>
|
||||
// Yet in titles, footnotes are functionally pointless in WordPress.
|
||||
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'
|
||||
|
||||
// initially hard-coded default
|
||||
// shows "9223372036854775807" in the numbox
|
||||
// empty should be interpreted as PHP_INT_MAX,
|
||||
// but a numbox cannot be set to empty: <https://github.com/Modernizr/Modernizr/issues/171>
|
||||
// define -1 as PHP_INT_MAX instead
|
||||
self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
|
||||
self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => PHP_INT_MAX,
|
||||
self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX,
|
||||
self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
|
||||
self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => PHP_INT_MAX,
|
||||
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
/**
|
||||
|
|
389
class/task.php
389
class/task.php
|
@ -5,13 +5,19 @@
|
|||
* @filesource
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*
|
||||
*
|
||||
* Edited for v2.0.0 and following.
|
||||
*
|
||||
* Edited for v2.0.5: Autoload / infinite scroll support added thanks to code from
|
||||
*
|
||||
* 2.0.5: Autoload / infinite scroll support added thanks to code from
|
||||
* @docteurfitness <https://wordpress.org/support/topic/auto-load-post-compatibility-update/>
|
||||
*
|
||||
* Last modified 2020-11-05T0524+0100
|
||||
*
|
||||
* 2.0.9: DISABLED the_post HOOK 2020-11-08T1839+0100
|
||||
* 2.1.0: promoted the 'Continue reading' button from localization to customization 2020-11-08T2146+0100
|
||||
* 2.1.1: combining identical footnotes: fixed dead links 2020-11-14T2233+0100
|
||||
* 2.1.1: options fixing ref container layout and referrer vertical alignment 2020-11-16T2024+0100
|
||||
* 2.1.1: option fixing ref container relative position 2020-11-17T0254+0100
|
||||
*
|
||||
* Last modified 2020-11-18T0138+0100
|
||||
*/
|
||||
|
||||
// If called directly, abort:
|
||||
|
@ -57,20 +63,37 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*
|
||||
* Edited for v2.0.5 2020-11-02T0330+0100 2020-11-04T2006+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.
|
||||
*
|
||||
* Edited for:
|
||||
* 2.0.5 through v2.0.7 changes to priority 2020-11-02T0330+0100..2020-11-06T1344+0100
|
||||
* 2.2.0 add settings for all hooks 2020-11-19T1248+0100
|
||||
*
|
||||
* Explicitly setting the_content priority to "10" instead of lowest "PHP_INT_MAX",
|
||||
* makes the footnotes reference container display beneath the post and above other
|
||||
* features added by other plugins, e.g. related post lists and social buttons.
|
||||
* Requested by users: <https://wordpress.org/support/topic/change-the-position-5/>
|
||||
* Documentation: <https://codex.wordpress.org/Plugin_API/#Hook_in_your_Filter>
|
||||
*
|
||||
* But then, the blog engine calls this plugin in the editor, as reported in:
|
||||
* <https://wordpress.org/support/topic/blogs-all-messed-up/>
|
||||
* <https://wordpress.org/support/topic/change-the-position-5/#post-13612697>
|
||||
* Default remains PHP_INT_MAX.
|
||||
* PHP_INT_MAX can be reset by leaving the number box empty.
|
||||
*/
|
||||
public function registerHooks() {
|
||||
|
||||
// get values from settings:
|
||||
$p_int_TheTitlePriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL));
|
||||
$p_int_TheContentPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL));
|
||||
$p_int_TheExcerptPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL));
|
||||
$p_int_WidgetTitlePriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL));
|
||||
$p_int_WidgetTextPriority = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL));
|
||||
|
||||
// PHP_INT_MAX can be set leaving the input field empty:
|
||||
$p_int_TheTitlePriority = !empty($p_int_TheTitlePriority ) ? $p_int_TheTitlePriority : PHP_INT_MAX;
|
||||
$p_int_TheContentPriority = !empty($p_int_TheContentPriority ) ? $p_int_TheContentPriority : PHP_INT_MAX;
|
||||
$p_int_TheExcerptPriority = !empty($p_int_TheExcerptPriority ) ? $p_int_TheExcerptPriority : PHP_INT_MAX;
|
||||
$p_int_WidgetTitlePriority = !empty($p_int_WidgetTitlePriority) ? $p_int_WidgetTitlePriority : PHP_INT_MAX;
|
||||
$p_int_WidgetTextPriority = !empty($p_int_WidgetTextPriority ) ? $p_int_WidgetTextPriority : PHP_INT_MAX;
|
||||
|
||||
|
||||
// append custom css to the header
|
||||
add_filter('wp_head', array($this, "wp_head"), PHP_INT_MAX);
|
||||
|
||||
|
@ -78,23 +101,30 @@ class MCI_Footnotes_Task {
|
|||
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"), PHP_INT_MAX);
|
||||
}
|
||||
add_filter('the_title', array($this, "the_title"), $p_int_TheTitlePriority);
|
||||
}
|
||||
|
||||
// custom priority level for reference container relative positioning; default 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"), PHP_INT_MAX);
|
||||
}
|
||||
add_filter('the_content', array($this, "the_content"), $p_int_TheContentPriority);
|
||||
}
|
||||
|
||||
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"), $p_int_TheExcerptPriority);
|
||||
}
|
||||
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"), $p_int_WidgetTitlePriority);
|
||||
}
|
||||
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);
|
||||
}
|
||||
add_filter('widget_text', array($this, "widget_text"), $p_int_WidgetTextPriority);
|
||||
}
|
||||
|
||||
|
||||
// REMOVED the_post HOOK 2020-11-08T1839+0100
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
// reset stored footnotes when displaying the header
|
||||
self::$a_arr_Footnotes = array();
|
||||
self::$a_bool_AllowLoveMe = true;
|
||||
|
@ -118,7 +148,12 @@ class MCI_Footnotes_Task {
|
|||
<style type="text/css" media="screen">
|
||||
<?php
|
||||
echo MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS);
|
||||
echo '.footnote_tooltip { display: none; padding: 12px; font-size: 13px;';
|
||||
|
||||
if (!MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE))) {
|
||||
echo "\r\n.home .footnotes_reference_container { display: none; }\r\n";
|
||||
}
|
||||
|
||||
echo '.footnote_tooltip {';
|
||||
if (!empty($l_str_Color)) {
|
||||
printf(" color: %s;", $l_str_Color);
|
||||
}
|
||||
|
@ -145,7 +180,19 @@ class MCI_Footnotes_Task {
|
|||
echo '}';
|
||||
?>
|
||||
</style>
|
||||
<?php
|
||||
<?php
|
||||
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE))) {
|
||||
echo '<script content="text/javascript">' . "\r\n";
|
||||
echo "\tfunction footnoteTooltipShow(footnoteTooltipId) {\r\n";
|
||||
echo "\t\tdocument.getElementById(footnoteTooltipId).classList.remove('hidden');\r\n";
|
||||
echo "\t\tdocument.getElementById(footnoteTooltipId).classList.add('shown');\r\n";
|
||||
echo "\t}\r\n";
|
||||
echo "\tfunction footnoteTooltipHide(footnoteTooltipId) { \r\n";
|
||||
echo "\t\tdocument.getElementById(footnoteTooltipId).classList.remove('shown');\r\n";
|
||||
echo "\t\tdocument.getElementById(footnoteTooltipId).classList.add('hidden');\r\n";
|
||||
echo "\t}\r\n";
|
||||
echo "</script>\r\n";
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -325,13 +372,17 @@ class MCI_Footnotes_Task {
|
|||
* @return string
|
||||
*/
|
||||
public function search($p_str_Content, $p_bool_ConvertHtmlChars, $p_bool_HideFootnotesText) {
|
||||
// post ID to make everything unique wrt archive view and infinite scroll
|
||||
global $l_int_PostID;
|
||||
$l_int_PostID = get_the_id();
|
||||
|
||||
// post ID to make everything unique wrt infinite scroll and archive view
|
||||
global $l_int_PostId;
|
||||
$l_int_PostId = get_the_id();
|
||||
|
||||
// contains the index for the next footnote on this page
|
||||
$l_int_FootnoteIndex = count(self::$a_arr_Footnotes) + 1;
|
||||
|
||||
// contains the starting position for the lookup of a footnote
|
||||
$l_int_PosStart = 0;
|
||||
|
||||
// get start and end tag for the footnotes short code
|
||||
$l_str_StartingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START);
|
||||
$l_str_EndingTag = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END);
|
||||
|
@ -351,7 +402,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;
|
||||
|
@ -376,63 +431,83 @@ class MCI_Footnotes_Task {
|
|||
}
|
||||
// calculate the length of the footnote
|
||||
$l_int_Length = $l_int_PosEnd - $l_int_PosStart;
|
||||
|
||||
// get footnote text
|
||||
$l_str_FootnoteText = substr($p_str_Content, $l_int_PosStart + strlen($l_str_StartingTag), $l_int_Length - strlen($l_str_StartingTag));
|
||||
|
||||
// Text to be displayed instead of the footnote
|
||||
$l_str_FootnoteReplaceText = "";
|
||||
// display the footnote as mouse-over box
|
||||
|
||||
// display the footnote referrers and the tooltips:
|
||||
if (!$p_bool_HideFootnotesText) {
|
||||
$l_str_Index = MCI_Footnotes_Convert::Index($l_int_FootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE));
|
||||
$l_int_Index = MCI_Footnotes_Convert::Index($l_int_FootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE));
|
||||
|
||||
// display only an excerpt of the footnotes text if enabled
|
||||
$l_str_ExcerptText = $l_str_FootnoteText;
|
||||
$l_bool_EnableExcerpt = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED));
|
||||
$l_int_MaxLength = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH));
|
||||
|
||||
if ($l_bool_EnableExcerpt) {
|
||||
$l_str_DummyText = strip_tags($l_str_FootnoteText);
|
||||
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 <a> element for style.
|
||||
$l_str_ExcerptText .= ' … ' . sprintf(__("%scontinue%s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '<a class="continue" onclick="footnote_moveToAnchor_' . $l_int_PostID . '(\'footnote_plugin_reference_' . $l_int_PostID . '_' . $l_str_Index . '\');">', '</a>');
|
||||
$l_str_ExcerptText = substr($l_str_DummyText, 0, $l_int_MaxLength);
|
||||
$l_str_ExcerptText = substr($l_str_ExcerptText, 0, strrpos($l_str_ExcerptText, ' '));
|
||||
$l_str_ExcerptText .= ' … ';
|
||||
$l_str_ExcerptText .= '<span class="footnote_tooltip_continue" ';
|
||||
$l_str_ExcerptText .= 'onclick="footnote_moveToAnchor_' . $l_int_PostId;
|
||||
$l_str_ExcerptText .= '(\'footnote_plugin_reference_' . $l_int_PostId;
|
||||
$l_str_ExcerptText .= '_' . $l_int_Index . '\');">';
|
||||
$l_str_ExcerptText .= MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL);
|
||||
$l_str_ExcerptText .= '</span>';
|
||||
}
|
||||
}
|
||||
|
||||
// fill the footnotes template templates/public/footnote.html
|
||||
// define the HTML element to use for the referrers:
|
||||
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS))) {
|
||||
$l_str_Element = 'sup';
|
||||
} else {
|
||||
$l_str_Element = 'span';
|
||||
}
|
||||
|
||||
// fill in 'templates/public/footnote.html':
|
||||
$l_obj_Template->replace(
|
||||
array(
|
||||
"post_id" => $l_int_PostID,
|
||||
"id" => $l_str_Index,
|
||||
"post_id" => $l_int_PostId,
|
||||
"id" => $l_int_Index,
|
||||
"element" => $l_str_Element,
|
||||
"before" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE),
|
||||
"index" => $l_str_Index,
|
||||
"index" => $l_int_Index,
|
||||
"after" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER),
|
||||
"text" => MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)) ? $l_str_ExcerptText : "",
|
||||
)
|
||||
);
|
||||
$l_str_FootnoteReplaceText = $l_obj_Template->getContent();
|
||||
|
||||
|
||||
// reset the template
|
||||
$l_obj_Template->reload();
|
||||
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED))) {
|
||||
$l_int_OffsetY = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y));
|
||||
$l_int_OffsetX = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X));
|
||||
|
||||
// fill in the tooltip template templates/public/tooltip.html
|
||||
|
||||
// fill in 'templates/public/tooltip.html':
|
||||
$l_obj_TemplateTooltip->replace(
|
||||
array(
|
||||
"post_id" => $l_int_PostID,
|
||||
"id" => $l_str_Index,
|
||||
"post_id" => $l_int_PostId,
|
||||
"id" => $l_int_Index,
|
||||
"position" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION),
|
||||
"offset-y" => !empty($l_int_OffsetY) ? $l_int_OffsetY : 0,
|
||||
"offset-x" => !empty($l_int_OffsetX) ? $l_int_OffsetX : 0
|
||||
"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();
|
||||
}
|
||||
}
|
||||
// replace the footnote with the template
|
||||
$p_str_Content = substr_replace($p_str_Content, $l_str_FootnoteReplaceText, $l_int_PosStart, $l_int_Length + strlen($l_str_EndingTag));
|
||||
|
||||
// add footnote only if not empty
|
||||
if (!empty($l_str_FootnoteText)) {
|
||||
// set footnote to the output box at the end
|
||||
|
@ -455,88 +530,218 @@ class MCI_Footnotes_Task {
|
|||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @return string
|
||||
*
|
||||
* Edited for 2.0.6: fixed line breaking behavior in footnote # clusters
|
||||
* Edited for 2.1.1: fixed fragment IDs and backlinks with combine identical turned on 2020-11-14T1808+0100
|
||||
*/
|
||||
public function ReferenceContainer() {
|
||||
// post ID to make everything unique wrt archive view and infinite scroll
|
||||
global $l_int_PostID;
|
||||
$l_int_PostID = get_the_id();
|
||||
|
||||
// post ID to make everything unique wrt infinite scroll and archive view:
|
||||
global $l_int_PostId;
|
||||
$l_int_PostId = get_the_id();
|
||||
|
||||
// no footnotes has been replaced on this page
|
||||
if (empty(self::$a_arr_Footnotes)) {
|
||||
return "";
|
||||
}
|
||||
// get html arrow
|
||||
$l_str_Arrow = MCI_Footnotes_Convert::getArrow(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW));
|
||||
// set html arrow to the first one if invalid index defined
|
||||
if (is_array($l_str_Arrow)) {
|
||||
$l_str_Arrow = MCI_Footnotes_Convert::getArrow(0);
|
||||
}
|
||||
// get user defined arrow
|
||||
$l_str_ArrowUserDefined = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED);
|
||||
if (!empty($l_str_ArrowUserDefined)) {
|
||||
$l_str_Arrow = $l_str_ArrowUserDefined;
|
||||
|
||||
|
||||
// FOOTNOTE INDEX BACKLINK SYMBOL
|
||||
|
||||
// check if arrow is enabled:
|
||||
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE))) {
|
||||
|
||||
// get html arrow
|
||||
$l_str_Arrow = MCI_Footnotes_Convert::getArrow(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW));
|
||||
// set html arrow to the first one if invalid index defined
|
||||
if (is_array($l_str_Arrow)) {
|
||||
$l_str_Arrow = MCI_Footnotes_Convert::getArrow(0);
|
||||
}
|
||||
// get user defined arrow
|
||||
$l_str_ArrowUserDefined = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED);
|
||||
if (!empty($l_str_ArrowUserDefined)) {
|
||||
$l_str_Arrow = $l_str_ArrowUserDefined;
|
||||
}
|
||||
|
||||
// wrap the arrow in a @media print { display:hidden } span:
|
||||
$l_str_FootnoteArrow = '<span class="footnote_index_arrow">';
|
||||
$l_str_FootnoteArrow .= $l_str_Arrow . '</span>';
|
||||
|
||||
} else {
|
||||
|
||||
// if it is, set it to empty:
|
||||
$l_str_Arrow = "";
|
||||
$l_str_FootnoteArrow = "";
|
||||
|
||||
}
|
||||
|
||||
// load template file
|
||||
$l_str_Body = "";
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body");
|
||||
|
||||
// REFERENCE CONTAINER TABLE ROW TEMPLATE LOAD
|
||||
|
||||
// line breaks for source readability:
|
||||
$l_str_Body = "\r\n\r\n";
|
||||
|
||||
// when combine identical is turned on, another template is needed:
|
||||
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) {
|
||||
// In the combined template, identifiers only are clickable.
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-combi");
|
||||
|
||||
} else {
|
||||
|
||||
// when 3-column layout is turned on (only valid if combining is turned off):
|
||||
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE))) {
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-3column");
|
||||
|
||||
} else {
|
||||
|
||||
// when switch symbol and index is turned on (only valid if 3-column is disabled):
|
||||
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH))) {
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-switch");
|
||||
|
||||
} else {
|
||||
|
||||
// default is the standard template:
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FILL IN THE TEMPLATE
|
||||
|
||||
// loop through all footnotes found in the page
|
||||
for ($l_str_Index = 0; $l_str_Index < count(self::$a_arr_Footnotes); $l_str_Index++) {
|
||||
for ($l_int_Index = 0; $l_int_Index < count(self::$a_arr_Footnotes); $l_int_Index++) {
|
||||
|
||||
// TEXT COLUMN
|
||||
|
||||
// get footnote text
|
||||
$l_str_FootnoteText = self::$a_arr_Footnotes[$l_str_Index];
|
||||
$l_str_FootnoteText = self::$a_arr_Footnotes[$l_int_Index];
|
||||
// if footnote is empty, get to the next one
|
||||
// With combine identical turned on, identicals will be deleted and are skipped:
|
||||
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));
|
||||
|
||||
// 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))) {
|
||||
// get all footnotes that I haven't passed yet
|
||||
for ($l_str_CheckIndex = $l_str_FirstFootnoteIndex; $l_str_CheckIndex < count(self::$a_arr_Footnotes); $l_str_CheckIndex++) {
|
||||
// check if a further footnote is the same as the actual one
|
||||
if ($l_str_FootnoteText == self::$a_arr_Footnotes[$l_str_CheckIndex]) {
|
||||
// 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));
|
||||
// INDEX COLUMN WITH ONE BACKLINK PER TABLE ROW
|
||||
|
||||
// Standard behavior appropriate for combine identical TURNED OFF
|
||||
|
||||
// generate content of footnote index cell
|
||||
$l_int_FirstFootnoteIndex = ($l_int_Index + 1);
|
||||
|
||||
// get the footnote index string and
|
||||
// keep supporting legacy index placeholder:
|
||||
$l_str_FootnoteIndex = MCI_Footnotes_Convert::Index(($l_int_Index + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE));
|
||||
|
||||
|
||||
|
||||
// SUPPORT FOR COMBINE IDENTICAL: COMPOSING ENUMERATED BACKLINKS
|
||||
|
||||
$l_str_FootnoteBacklinks = "";
|
||||
|
||||
if ( MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) {
|
||||
|
||||
$l_str_FootnoteId = $l_str_FootnoteIndex;
|
||||
|
||||
// The dedicated template enumerating backlinks uses a new placeholder:
|
||||
|
||||
$l_str_FootnoteBacklinks = '<a id="footnote_plugin_reference_';
|
||||
$l_str_FootnoteBacklinks .= $l_int_PostId;
|
||||
$l_str_FootnoteBacklinks .= "_$l_str_FootnoteId";
|
||||
$l_str_FootnoteBacklinks .= '" class="footnote_backlink" ';
|
||||
$l_str_FootnoteBacklinks .= 'onclick="footnote_moveToAnchor_' . $l_int_PostId;
|
||||
$l_str_FootnoteBacklinks .= "('footnote_plugin_tooltip_$l_int_PostId";
|
||||
$l_str_FootnoteBacklinks .= "_$l_str_FootnoteId');\">";
|
||||
$l_str_FootnoteBacklinks .= $l_str_FootnoteArrow;
|
||||
$l_str_FootnoteBacklinks .= $l_str_FootnoteId . '</a>';
|
||||
|
||||
// If that is the only footnote with this text, we’re done.
|
||||
|
||||
}
|
||||
|
||||
|
||||
// CHECK IF COMBINE IDENTICAL IS TURNED ON, and
|
||||
// check if it isn't the last footnote in the array:
|
||||
if ($l_int_FirstFootnoteIndex < count(self::$a_arr_Footnotes) && MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) {
|
||||
|
||||
// get all footnotes that haven't passed yet:
|
||||
for ($l_int_CheckIndex = $l_int_FirstFootnoteIndex; $l_int_CheckIndex < count(self::$a_arr_Footnotes); $l_int_CheckIndex++) {
|
||||
|
||||
// check if a further footnote is the same as the actual one:
|
||||
if ($l_str_FootnoteText == self::$a_arr_Footnotes[$l_int_CheckIndex]) {
|
||||
|
||||
// if so, set the further footnote as empty so it won't be displayed later:
|
||||
self::$a_arr_Footnotes[$l_int_CheckIndex] = "";
|
||||
|
||||
|
||||
// HERE GOES THE FRAGMENT IDENTIFIER AND THE BACKLINK TOO:
|
||||
// add the footnote index to the actual index:
|
||||
|
||||
// update the footnote ID:
|
||||
$l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE));
|
||||
|
||||
// keep on composing the backlinks enumeration:
|
||||
$l_str_FootnoteBacklinks .= ', <a id="footnote_plugin_reference_';
|
||||
$l_str_FootnoteBacklinks .= $l_int_PostId;
|
||||
$l_str_FootnoteBacklinks .= "_$l_str_FootnoteId";
|
||||
$l_str_FootnoteBacklinks .= '" class="footnote_backlink" ';
|
||||
$l_str_FootnoteBacklinks .= 'onclick="footnote_moveToAnchor_' . $l_int_PostId;
|
||||
$l_str_FootnoteBacklinks .= "('footnote_plugin_tooltip_$l_int_PostId";
|
||||
$l_str_FootnoteBacklinks .= "_$l_str_FootnoteId');\">";
|
||||
$l_str_FootnoteBacklinks .= $l_str_FootnoteArrow;
|
||||
$l_str_FootnoteBacklinks .= $l_str_FootnoteId . '</a>';
|
||||
|
||||
// this legacy is not used:
|
||||
//$l_str_FootnoteIndex .= ', ' . MCI_Footnotes_Convert::Index(($l_int_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// replace all placeholders in the template templates/public/reference-container-body.html
|
||||
|
||||
// replace all placeholders in 'templates/public/reference-container-body.html'
|
||||
// or in 'templates/public/reference-container-body-combi.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
|
||||
// placeholder used in all templates:
|
||||
"text" => $l_str_FootnoteText,
|
||||
|
||||
// used in standard layout W/O COMBINED FOOTNOTES:
|
||||
"post_id" => $l_int_PostId,
|
||||
"id" => MCI_Footnotes_Convert::Index($l_int_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)),
|
||||
|
||||
// used in standard layout WITH COMBINED IDENTICALS TURNED ON:
|
||||
"backlinks" => $l_str_FootnoteBacklinks,
|
||||
|
||||
// Legacy placeholders for use in legacy layout templates:
|
||||
"arrow" => $l_str_FootnoteArrow,
|
||||
"index" => $l_str_FootnoteIndex,
|
||||
)
|
||||
);
|
||||
|
||||
$l_str_Body .= $l_obj_Template->getContent();
|
||||
|
||||
// extra line breaks for page source legibility:
|
||||
$footnote_item_temp = $l_obj_Template->getContent();
|
||||
$footnote_item_temp .= "\r\n\r\n";
|
||||
$l_str_Body .= $footnote_item_temp;
|
||||
$l_str_Body .= "\r\n\r\n";
|
||||
|
||||
$l_obj_Template->reload();
|
||||
|
||||
}
|
||||
|
||||
// load template file templates/public/reference-container.html
|
||||
// load 'templates/public/reference-container.html':
|
||||
$l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container");
|
||||
$l_obj_TemplateContainer->replace(
|
||||
array(
|
||||
"post_id" => $l_int_PostID,
|
||||
"post_id" => $l_int_PostId,
|
||||
"label" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME),
|
||||
"button-style" => !MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)) ? 'display: none;' : '',
|
||||
"style" => MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)) ? 'display: none;' : '',
|
||||
"content" => $l_str_Body
|
||||
"content" => $l_str_Body,
|
||||
)
|
||||
);
|
||||
|
||||
// free all found footnotes if reference container will be displayed
|
||||
self::$a_arr_Footnotes = array();
|
||||
|
||||
|
||||
return $l_obj_TemplateContainer->getContent();
|
||||
}
|
||||
}
|
||||
|
|
218
css/public.css
218
css/public.css
|
@ -4,17 +4,19 @@
|
|||
* Created-Date: 15.05.14
|
||||
* Created-Time: 16:21
|
||||
* Since: 1.0
|
||||
* Version: 2.0.6
|
||||
* Version: 2.1.2
|
||||
*
|
||||
* Last modified: 2020-11-04T2131+0100
|
||||
* Last modified: 2020-11-19T1444+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
|
||||
|
||||
class/config.php
|
||||
css/settings.css
|
||||
*/
|
||||
|
||||
.footnotes_logo,
|
||||
.footnotes_logo:hover,
|
||||
|
@ -31,51 +33,116 @@
|
|||
color: #545f5a;
|
||||
}
|
||||
|
||||
/* Inline footnote referrers
|
||||
* aka superscript footnote anchors
|
||||
*
|
||||
* Class footnote_plugin_tooltip_text is the referrer and surroundings
|
||||
*/
|
||||
/*‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
Footnote referrers and tooltips
|
||||
|
||||
templates/public/footnote.html
|
||||
templates/public/footnote-alternative.html
|
||||
|
||||
.footnote_referrer = enclosing <span>
|
||||
.footnote_plugin_tooltip_text = inner <sup>
|
||||
.footnote_tooltip = inner <span>
|
||||
*/
|
||||
|
||||
.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;
|
||||
line-height: 0;
|
||||
cursor: pointer;
|
||||
z-index: 1;
|
||||
}
|
||||
.footnote_plugin_tooltip_text {
|
||||
display: inline-block;
|
||||
text-decoration: none;
|
||||
}
|
||||
.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;
|
||||
cursor: auto;
|
||||
text-align: left;
|
||||
padding: 12px;
|
||||
line-height: 1.2em;
|
||||
z-index: 99;
|
||||
font-size: inherit;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
.continue {
|
||||
.footnote_tooltip a {
|
||||
word-wrap: anywhere;
|
||||
}
|
||||
|
||||
/*
|
||||
alternative tooltip implementation
|
||||
*/
|
||||
.footnote_referrer.relative {
|
||||
position: relative;
|
||||
}
|
||||
.footnote_tooltip.position {
|
||||
display: unset;
|
||||
position: absolute;
|
||||
bottom: 24px;
|
||||
left: -50px;
|
||||
width: 400px;
|
||||
}
|
||||
/*
|
||||
fade-in parameters
|
||||
*/
|
||||
.footnote_tooltip.shown {
|
||||
visibility: visible;
|
||||
opacity: 1;
|
||||
transition-property: visibility opacity;
|
||||
transition-duration: 200ms;
|
||||
transition-timing-function: linear;
|
||||
transition-delay: 0ms;
|
||||
}
|
||||
/*
|
||||
fade-out parameters
|
||||
*/
|
||||
.footnote_tooltip.hidden {
|
||||
visibility: hidden;
|
||||
opacity: 0;
|
||||
transition-property: visibility opacity;
|
||||
transition-duration: 200ms;
|
||||
transition-timing-function: linear;
|
||||
transition-delay: 400ms;
|
||||
}
|
||||
|
||||
/*
|
||||
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;
|
||||
}
|
||||
|
||||
/* Footnotes reference container
|
||||
*/
|
||||
|
||||
/* label */
|
||||
/*‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
Footnote references container
|
||||
|
||||
templates/public/reference-container.html
|
||||
*/
|
||||
|
||||
/*
|
||||
label
|
||||
*/
|
||||
.footnote_container_prepare {
|
||||
display: block !important;
|
||||
padding-top: 24px !important;
|
||||
margin-bottom: -5px;
|
||||
}
|
||||
.footnote_container_prepare > p {
|
||||
line-height: 1.3 !important;
|
||||
|
@ -98,84 +165,111 @@ 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;
|
||||
}
|
||||
.footnote_container_prepare > p > span:last-child a {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.footnote_container_prepare > p > span:last-child a:hover {
|
||||
text-decoration: underline;
|
||||
color: #008800;
|
||||
}
|
||||
|
||||
/* Table starts here */
|
||||
/*
|
||||
table
|
||||
*/
|
||||
.footnote-reference-container {
|
||||
width: 100%;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* footnotes
|
||||
* class footnote_plugin_link is for backcompat.
|
||||
* Used in reference-container-body.html
|
||||
* See <https://wordpress.org/support/topic/change-the-position-5/#post-13617988>
|
||||
.footnote_plugin_link, */
|
||||
/*
|
||||
footnotes
|
||||
reference-container-body.html
|
||||
*/
|
||||
.footnote_plugin_index,
|
||||
.footnote_plugin_index_combi,
|
||||
.footnote_plugin_link,
|
||||
.footnote_plugin_text {
|
||||
border:none !important;
|
||||
text-align: left !important;
|
||||
vertical-align: top !important;
|
||||
padding: 10px 5px 5px 0 !important;
|
||||
padding: 5px 6px 10px 0 !important;
|
||||
}
|
||||
.footnote_plugin_index a,
|
||||
.footnote_plugin_text a {
|
||||
.footnote_backlink,
|
||||
.footnote_backlink:link,
|
||||
.footnote_plugin_link,
|
||||
.footnote_plugin_link:link,
|
||||
.main-content .footnote_backlink,
|
||||
.main-content .footnote_backlink:link,
|
||||
.main-content .footnote_plugin_link,
|
||||
.main-content .footnote_plugin_link:link {
|
||||
text-decoration: none !important;
|
||||
border-bottom: none !important;
|
||||
}
|
||||
/*
|
||||
These rules when enabled cause the backlink to take an overline
|
||||
when hovered in some themes, not in others:
|
||||
.footnote_plugin_index:hover,
|
||||
.footnote_plugin_index.pointer:hover,
|
||||
*/
|
||||
.footnote_backlink:hover,
|
||||
.footnote_plugin_index_combi:hover,
|
||||
.footnote_plugin_link:hover,
|
||||
.footnote_plugin_text a:hover {
|
||||
text-decoration: unset;
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
.footnote_plugin_index {
|
||||
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;
|
||||
overflow: hidden;
|
||||
width: 2em; /*auto-extending column to fit widest*/
|
||||
}
|
||||
.footnote_backlink,
|
||||
.footnote_plugin_link {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.footnote_index,
|
||||
.footnote_backlink,
|
||||
.footnote_plugin_index.pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.footnote_plugin_text {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
/* 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 (button, arrows) and link styling are removed.
|
||||
/*‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
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_overall_wrapper {
|
||||
.footnotes_reference_container {
|
||||
page-break-inside: avoid;
|
||||
}
|
||||
|
||||
@media print {
|
||||
.footnote_tooltip,
|
||||
.footnote_reference_container_collapse_button,
|
||||
.footnote_plugin_index_arrow {
|
||||
.footnote_index_arrow {
|
||||
display: none;
|
||||
}
|
||||
.footnote_plugin_tooltip_text {
|
||||
|
@ -185,7 +279,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)*/
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,9 @@
|
|||
* Created-Date: 15.05.14
|
||||
* Created-Time: 16:21
|
||||
* Since: 1.0
|
||||
* Version: 2.0.4
|
||||
* Last modified: 2020-11-01T0415+0100
|
||||
* Version: 2.1.2
|
||||
*
|
||||
* Last modified: 2020-11-19T1445+0100
|
||||
*/
|
||||
|
||||
|
||||
|
@ -37,8 +38,16 @@
|
|||
left: 96px;
|
||||
}
|
||||
|
||||
|
||||
input[type=text], input[type=password], textarea, select {
|
||||
/*
|
||||
On User Request: limited to a number of IDs to not affect all dashboards
|
||||
<https://wordpress.org/support/topic/all-input-have-width-80/>
|
||||
*/
|
||||
#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;
|
||||
|
@ -90,3 +99,34 @@ span.footnote_highlight_placeholder {
|
|||
margin: 20px auto !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
/*
|
||||
initialized from style attributes in templates
|
||||
IE doesn’t support nth child, but these are not critical
|
||||
*/
|
||||
.expert-lookup tr th:first-child,
|
||||
.expert-lookup tr td:first-child {
|
||||
width: 170px !important;
|
||||
}
|
||||
.expert-lookup tr th:nth-child(2),
|
||||
.expert-lookup tr td:nth-child(2) {
|
||||
width: 65px !important;
|
||||
}
|
||||
.expert-lookup tr th:nth-child(3),
|
||||
.expert-lookup tr td:nth-child(3) {
|
||||
width: 200px !important;
|
||||
}
|
||||
.expert-lookup tr td:nth-child(3) input {
|
||||
width: 190px;
|
||||
}
|
||||
.expert-lookup tr th:last-child,
|
||||
.expert-lookup tr td:last-child {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.footnotes-description {
|
||||
padding: 0 10px;
|
||||
}
|
||||
.footnotes-description p {
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
|
|
@ -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.1.2
|
||||
Author URI: http://cheret.de/plugins/footnotes-2/
|
||||
Text Domain: footnotes
|
||||
Domain Path: /languages
|
||||
|
|
431
js/jquery.tools.js
Normal file
431
js/jquery.tools.js
Normal file
|
@ -0,0 +1,431 @@
|
|||
/*!
|
||||
* jQuery Tools v1.2.7 - The missing UI library for the Web
|
||||
*
|
||||
* toolbox/toolbox.expose.js
|
||||
* toolbox/toolbox.flashembed.js
|
||||
* toolbox/toolbox.history.js
|
||||
* toolbox/toolbox.mousewheel.js
|
||||
* tooltip/tooltip.js
|
||||
* tooltip/tooltip.dynamic.js
|
||||
* tooltip/tooltip.slide.js
|
||||
*
|
||||
* NO COPYRIGHTS OR LICENSES. DO WHAT YOU LIKE.
|
||||
*
|
||||
* http://flowplayer.org/tools/
|
||||
*
|
||||
* jquery.event.wheel.js - rev 1
|
||||
* Copyright (c) 2008, Three Dub Media (http://threedubmedia.com)
|
||||
* Liscensed under the MIT License (MIT-LICENSE.txt)
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* Created: 2008-07-01 | Updated: 2008-07-14
|
||||
*
|
||||
* -----
|
||||
*
|
||||
* Added checks whether jQuery.browser exists 2020-10-26T2005+0100
|
||||
* <https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13456762>
|
||||
*
|
||||
* Removed usage of jQuery browser check function 2020-11-12T0127+0100
|
||||
* ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
|
||||
* See also on the Forum: <https://wordpress.org/support/topic/after-wp-5-5-upgrade-jquery-is-deprecated/>,
|
||||
* lastly <https://wordpress.org/support/topic/jquery-issues-13/>
|
||||
*
|
||||
* #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.
|
||||
*
|
||||
* Re-formatted minified file. Last modified: 2020-11-13T0444+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) {
|
||||
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()]
|
||||
}
|
||||
|
||||
function d(b) {
|
||||
if (b)return b.call(a.mask)
|
||||
}
|
||||
|
||||
var e, f, g, h, i;
|
||||
a.mask = {load: function (j, k) {
|
||||
if (g)return this;
|
||||
typeof j == "string" && (j = {color: j}), j = j || h, h = j = a.extend(a.extend({}, b.conf), j), e = a("#" + j.maskId), e.length || (e = a("<div/>").attr("id", j.maskId), a("body").append(e));
|
||||
var l = c();
|
||||
e.css({position: "absolute", top: 0, left: 0, width: l[0], height: l[1], display: "none", opacity: j.startOpacity, zIndex: j.zIndex}), j.color && e.css("backgroundColor", j.color);
|
||||
if (d(j.onBeforeLoad) === !1)return this;
|
||||
j.closeOnEsc && a(document).on("keydown.mask", function (b) {
|
||||
b.keyCode == 27 && a.mask.close(b)
|
||||
}), j.closeOnClick && e.on("click.mask", function (b) {
|
||||
a.mask.close(b)
|
||||
}), a(window).on("resize.mask", function () {
|
||||
a.mask.fit()
|
||||
}), k && k.length && (i = k.eq(0).css("zIndex"), a.each(k, function () {
|
||||
var b = a(this);
|
||||
/relative|absolute|fixed/i.test(b.css("position")) || b.css("position", "relative")
|
||||
}), f = k.css({zIndex: Math.max(j.zIndex + 1, i == "auto" ? 0 : i)})), e.css({display: "block"}).fadeTo(j.loadSpeed, j.opacity, function () {
|
||||
a.mask.fit(), d(j.onLoad), g = "full"
|
||||
}), g = !0;
|
||||
return this
|
||||
}, close: function () {
|
||||
if (g) {
|
||||
if (d(h.onBeforeClose) === !1)return this;
|
||||
e.fadeOut(h.closeSpeed, function () {
|
||||
d(h.onClose), f && f.css({zIndex: i}), g = !1
|
||||
}), a(document).off("keydown.mask"), e.off("click.mask"), a(window).off("resize.mask")
|
||||
}
|
||||
return this
|
||||
}, fit: function () {
|
||||
if (g) {
|
||||
var a = c();
|
||||
e.css({width: a[0], height: a[1]})
|
||||
}
|
||||
}, getMask: function () {
|
||||
return e
|
||||
}, isLoaded: function (a) {
|
||||
return a ? g == "full" : g
|
||||
}, getConf: function () {
|
||||
return h
|
||||
}, getExposed: function () {
|
||||
return f
|
||||
}}, a.fn.mask = function (b) {
|
||||
a.mask.load(b);
|
||||
return this
|
||||
}, a.fn.expose = function (b) {
|
||||
a.mask.load(b, this);
|
||||
return this
|
||||
}
|
||||
})(jQuery);
|
||||
(function () {
|
||||
var a = document.all, b = "http://www.adobe.com/go/getflashplayer", c = typeof jQuery == "function", d = /(\d+)[^\d]+(\d+)[^\d]*(\d*)/, e = {width: "100%", height: "100%", id: "_" + ("" + Math.random()).slice(9), allowfullscreen: !0, allowscriptaccess: "always", quality: "high", version: [3, 0], onFail: null, expressInstall: null, w3c: !1, cachebusting: !1};
|
||||
window.attachEvent && window.attachEvent("onbeforeunload", function () {
|
||||
__flash_unloadHandler = function () {
|
||||
}, __flash_savedUnloadHandler = function () {
|
||||
}
|
||||
});
|
||||
function f(a, b) {
|
||||
if (b)for (var c in b)b.hasOwnProperty(c) && (a[c] = b[c]);
|
||||
return a
|
||||
}
|
||||
|
||||
function g(a, b) {
|
||||
var c = [];
|
||||
for (var d in a)a.hasOwnProperty(d) && (c[d] = b(a[d]));
|
||||
return c
|
||||
}
|
||||
|
||||
window.flashembed = function (a, b, c) {
|
||||
typeof a == "string" && (a = document.getElementById(a.replace("#", "")));
|
||||
if (a) {
|
||||
typeof b == "string" && (b = {src: b});
|
||||
return new j(a, f(f({}, e), b), c)
|
||||
}
|
||||
};
|
||||
var h = f(window.flashembed, {conf: e, getVersion: function () {
|
||||
var a, b;
|
||||
try {
|
||||
b = navigator.plugins["Shockwave Flash"].description.slice(16)
|
||||
} catch (c) {
|
||||
try {
|
||||
a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"), b = a && a.GetVariable("$version")
|
||||
} catch (e) {
|
||||
try {
|
||||
a = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"), b = a && a.GetVariable("$version")
|
||||
} catch (f) {
|
||||
}
|
||||
}
|
||||
}
|
||||
b = d.exec(b);
|
||||
return b ? [b[1], b[3]] : [0, 0]
|
||||
}, asString: function (a) {
|
||||
if (a === null || a === undefined)return null;
|
||||
var b = typeof a;
|
||||
b == "object" && a.push && (b = "array");
|
||||
switch (b) {
|
||||
case"string":
|
||||
a = a.replace(new RegExp("([\"\\\\])", "g"), "\\$1"), a = a.replace(/^\s?(\d+\.?\d*)%/, "$1pct");
|
||||
return"\"" + a + "\"";
|
||||
case"array":
|
||||
return"[" + g(a,function (a) {
|
||||
return h.asString(a)
|
||||
}).join(",") + "]";
|
||||
case"function":
|
||||
return"\"function()\"";
|
||||
case"object":
|
||||
var c = [];
|
||||
for (var d in a)a.hasOwnProperty(d) && c.push("\"" + d + "\":" + h.asString(a[d]));
|
||||
return"{" + c.join(",") + "}"
|
||||
}
|
||||
return String(a).replace(/\s/g, " ").replace(/\'/g, "\"")
|
||||
}, getHTML: function (b, c) {
|
||||
b = f({}, b);
|
||||
var d = "<object width=\"" + b.width + "\" height=\"" + b.height + "\" id=\"" + b.id + "\" name=\"" + b.id + "\"";
|
||||
b.cachebusting && (b.src += (b.src.indexOf("?") != -1 ? "&" : "?") + Math.random()), b.w3c || !a ? d += " data=\"" + b.src + "\" type=\"application/x-shockwave-flash\"" : d += " classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"", d += ">";
|
||||
if (b.w3c || a)d += "<param name=\"movie\" value=\"" + b.src + "\" />";
|
||||
b.width = b.height = b.id = b.w3c = b.src = null, b.onFail = b.version = b.expressInstall = null;
|
||||
for (var e in b)b[e] && (d += "<param name=\"" + e + "\" value=\"" + b[e] + "\" />");
|
||||
var g = "";
|
||||
if (c) {
|
||||
for (var i in c)if (c[i]) {
|
||||
var j = c[i];
|
||||
g += i + "=" + encodeURIComponent(/function|object/.test(typeof j) ? h.asString(j) : j) + "&"
|
||||
}
|
||||
g = g.slice(0, -1), d += "<param name=\"flashvars\" value='" + g + "' />"
|
||||
}
|
||||
d += "</object>";
|
||||
return d
|
||||
}, isSupported: function (a) {
|
||||
return i[0] > a[0] || i[0] == a[0] && i[1] >= a[1]
|
||||
}}), i = h.getVersion();
|
||||
|
||||
function j(c, d, e) {
|
||||
if (h.isSupported(d.version))c.innerHTML = h.getHTML(d, e); else if (d.expressInstall && h.isSupported([6, 65]))c.innerHTML = h.getHTML(f(d, {src: d.expressInstall}), {MMredirectURL: location.href, MMplayerType: "PlugIn", MMdoctitle: document.title}); else {
|
||||
c.innerHTML.replace(/\s/g, "") || (c.innerHTML = "<h2>Flash version " + d.version + " or greater is required</h2><h3>" + (i[0] > 0 ? "Your version is " + i : "You have no flash plugin installed") + "</h3>" + (c.tagName == "A" ? "<p>Click here to download latest version</p>" : "<p>Download latest version from <a href='" + b + "'>here</a></p>"), c.tagName == "A" && (c.onclick = function () {
|
||||
location.href = b
|
||||
}));
|
||||
if (d.onFail) {
|
||||
var g = d.onFail.call(this);
|
||||
typeof g == "string" && (c.innerHTML = g)
|
||||
}
|
||||
}
|
||||
a && (window[d.id] = document.getElementById(d.id)), f(this, {getRoot: function () {
|
||||
return c
|
||||
}, getOptions: function () {
|
||||
return d
|
||||
}, getConf: function () {
|
||||
return e
|
||||
}, getApi: function () {
|
||||
return c.firstChild
|
||||
}})
|
||||
}
|
||||
|
||||
c && (jQuery.tools = jQuery.tools || {version: "v1.2.7"}, jQuery.tools.flashembed = {conf: e}, jQuery.fn.flashembed = function (a, b) {
|
||||
return this.each(function () {
|
||||
jQuery(this).data("flashembed", flashembed(this, a, b))
|
||||
})
|
||||
})
|
||||
})();
|
||||
(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("<iframe/>").attr("src", "javascript:false;").hide().get(0), a("body").append(c), setInterval(function () {
|
||||
var d = c.contentWindow.document, e = d.location.hash;
|
||||
b !== e && a(window).trigger("hash", e)
|
||||
}, 100), f(location.hash || "#")) :*/ setInterval(function () {
|
||||
var c = location.hash;
|
||||
c !== b && a(window).trigger("hash", c)
|
||||
}, 100), d = d ? d.add(g) : g, g.click(function (b) {
|
||||
var d = a(this).attr("href");
|
||||
c && f(d);
|
||||
if (d.slice(0, 1) != "#") {
|
||||
location.href = "#" + d;
|
||||
return b.preventDefault()
|
||||
}
|
||||
}), e = !0)
|
||||
}};
|
||||
function f(a) {
|
||||
if (a) {
|
||||
var b = c.contentWindow.document;
|
||||
b.open().close(), b.location.hash = a
|
||||
}
|
||||
}
|
||||
|
||||
a(window).on("hash", function (c, e) {
|
||||
e ? d.filter(function () {
|
||||
var b = a(this).attr("href");
|
||||
return b == e || b == e.replace("#", "")
|
||||
}).trigger("history", [e]) : d.eq(0).trigger("history", [e]), b = e
|
||||
}), a.fn.history = function (b) {
|
||||
a.tools.history.init(this);
|
||||
return this.on("history", b)
|
||||
}
|
||||
})(jQuery);
|
||||
(function (a) {
|
||||
a.fn.mousewheel = function (a) {
|
||||
return this[a ? "on" : "trigger"]("wheel", a)
|
||||
}, a.event.special.wheel = {setup: function () {
|
||||
a.event.add(this, b, c, {})
|
||||
}, teardown: function () {
|
||||
a.event.remove(this, b, c)
|
||||
}};
|
||||
var b = /*a.browser.mozilla ? "DOMMouseScroll" + (a.browser.version < "1.9" ? " mousemove" : "") :*/ "mousewheel";
|
||||
|
||||
function c(b) {
|
||||
switch (b.type) {
|
||||
case"mousemove":
|
||||
return a.extend(b.data, {clientX: b.clientX, clientY: b.clientY, pageX: b.pageX, pageY: b.pageY});
|
||||
case"DOMMouseScroll":
|
||||
a.extend(b, b.data), b.delta = -b.detail / 3;
|
||||
break;
|
||||
case"mousewheel":
|
||||
b.delta = b.wheelDelta / 120
|
||||
}
|
||||
b.type = "wheel";
|
||||
return a.event.handle.call(this, b, b.delta)
|
||||
}
|
||||
})(jQuery);
|
||||
(function (a) {
|
||||
a.tools = a.tools || {version: "v1.2.7"}, a.tools.tooltip = {conf: {effect: "toggle", fadeOutSpeed: "fast", predelay: 0, delay: 30, opacity: 1, tip: 0, fadeIE: !1, position: ["top", "center"], offset: [0, 0], relative: !1, cancelDefault: !0, events: {def: "mouseenter,mouseleave", input: "focus,blur", widget: "focus mouseenter,blur mouseleave", tooltip: "mouseenter,mouseleave"}, layout: "<div/>", tipClass: "tooltip"}, addEffect: function (a, c, d) {
|
||||
b[a] = [c, d]
|
||||
}};
|
||||
var b = {toggle: [function (a) {
|
||||
var b = this.getConf(), c = this.getTip(), d = b.opacity;
|
||||
d < 1 && c.css({opacity: d}), c.show(), a.call()
|
||||
}, function (a) {
|
||||
this.getTip().hide(), a.call()
|
||||
}], fade: [function (b) {
|
||||
var c = this.getConf();
|
||||
/*!(a.browser && a.browser.msie) || c.fadeIE ?*/ this.getTip().fadeTo(c.fadeInSpeed, c.opacity, b) /*: (this.getTip().show(), b())*/
|
||||
}, function (b) {
|
||||
var c = this.getConf();
|
||||
/*!(a.browser && a.browser.msie) || c.fadeIE ?*/ this.getTip().fadeOut(c.fadeOutSpeed, b) /*: (this.getTip().hide(), b())*/
|
||||
}]};
|
||||
|
||||
function c(b, c, d) {
|
||||
var e = d.relative ? b.position().top : b.offset().top, f = d.relative ? b.position().left : b.offset().left, g = d.position[0];
|
||||
e -= c.outerHeight() - d.offset[0], f += b.outerWidth() + d.offset[1], /iPad/i.test(navigator.userAgent) && (e -= a(window).scrollTop());
|
||||
var h = c.outerHeight() + b.outerHeight();
|
||||
g == "center" && (e += h / 2), g == "bottom" && (e += h), g = d.position[1];
|
||||
var i = c.outerWidth() + b.outerWidth();
|
||||
g == "center" && (f -= i / 2), g == "left" && (f -= i);
|
||||
return{top: e, left: f}
|
||||
}
|
||||
|
||||
function d(d, e) {
|
||||
var f = this, g = d.add(f), h, i = 0, j = 0, k = d.attr("title"), l = d.attr("data-tooltip"), m = b[e.effect], n, o = d.is(":input"), p = o && d.is(":checkbox, :radio, select, :button, :submit"), q = d.attr("type"), r = e.events[q] || e.events[o ? p ? "widget" : "input" : "def"];
|
||||
if (!m)throw"Nonexistent effect \"" + e.effect + "\"";
|
||||
r = r.split(/,\s*/);
|
||||
if (r.length != 2)throw"Tooltip: bad events configuration for " + q;
|
||||
d.on(r[0],function (a) {
|
||||
clearTimeout(i), e.predelay ? j = setTimeout(function () {
|
||||
f.show(a)
|
||||
}, e.predelay) : f.show(a)
|
||||
}).on(r[1], function (a) {
|
||||
clearTimeout(j), e.delay ? i = setTimeout(function () {
|
||||
f.hide(a)
|
||||
}, e.delay) : f.hide(a)
|
||||
}), k && e.cancelDefault && (d.removeAttr("title"), d.data("title", k)), a.extend(f, {show: function (b) {
|
||||
if (!h) {
|
||||
l ? h = a(l) : e.tip ? h = a(e.tip).eq(0) : k ? h = a(e.layout).addClass(e.tipClass).appendTo(document.body).hide().append(k) : (h = d.next(), h.length || (h = d.parent().next()));
|
||||
if (!h.length)throw"Cannot find tooltip for " + d
|
||||
}
|
||||
if (f.isShown())return f;
|
||||
h.stop(!0, !0);
|
||||
var o = c(d, h, e);
|
||||
e.tip && h.html(d.data("title")), b = a.Event(), b.type = "onBeforeShow", g.trigger(b, [o]);
|
||||
if (b.isDefaultPrevented())return f;
|
||||
o = c(d, h, e), h.css({position: "absolute", top: o.top, left: o.left}), n = !0, m[0].call(f, function () {
|
||||
b.type = "onShow", n = "full", g.trigger(b)
|
||||
});
|
||||
var p = e.events.tooltip.split(/,\s*/);
|
||||
h.data("__set") || (h.off(p[0]).on(p[0], function () {
|
||||
clearTimeout(i), clearTimeout(j)
|
||||
}), p[1] && !d.is("input:not(:checkbox, :radio), textarea") && h.off(p[1]).on(p[1], function (a) {
|
||||
a.relatedTarget != d[0] && d.trigger(r[1].split(" ")[0])
|
||||
}), e.tip || h.data("__set", !0));
|
||||
return f
|
||||
}, hide: function (c) {
|
||||
if (!h || !f.isShown())return f;
|
||||
c = a.Event(), c.type = "onBeforeHide", g.trigger(c);
|
||||
if (!c.isDefaultPrevented()) {
|
||||
n = !1, b[e.effect][1].call(f, function () {
|
||||
c.type = "onHide", g.trigger(c)
|
||||
});
|
||||
return f
|
||||
}
|
||||
}, isShown: function (a) {
|
||||
return a ? n == "full" : n
|
||||
}, getConf: function () {
|
||||
return e
|
||||
}, getTip: function () {
|
||||
return h
|
||||
}, getTrigger: function () {
|
||||
return d
|
||||
}}), a.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","), function (b, c) {
|
||||
a.isFunction(e[c]) && a(f).on(c, e[c]), f[c] = function (b) {
|
||||
b && a(f).on(c, b);
|
||||
return f
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
a.fn.tooltip = function (b) {
|
||||
var c = this.data("tooltip");
|
||||
if (c)return c;
|
||||
b = a.extend(!0, {}, a.tools.tooltip.conf, b), typeof b.position == "string" && (b.position = b.position.split(/,?\s/)), this.each(function () {
|
||||
c = new d(a(this), b), a(this).data("tooltip", c)
|
||||
});
|
||||
return b.api ? c : this
|
||||
}
|
||||
})(jQuery);
|
||||
(function (a) {
|
||||
var b = a.tools.tooltip;
|
||||
b.dynamic = {conf: {classNames: "top right bottom left"}};
|
||||
function c(b) {
|
||||
var c = a(window), d = c.width() + c.scrollLeft(), e = c.height() + c.scrollTop();
|
||||
return[b.offset().top <= c.scrollTop(), d <= b.offset().left + b.width(), e <= b.offset().top + b.height(), c.scrollLeft() >= b.offset().left]
|
||||
}
|
||||
|
||||
function d(a) {
|
||||
var b = a.length;
|
||||
while (b--)if (a[b])return!1;
|
||||
return!0
|
||||
}
|
||||
|
||||
a.fn.dynamic = function (e) {
|
||||
typeof e == "number" && (e = {speed: e}), e = a.extend({}, b.dynamic.conf, e);
|
||||
var f = a.extend(!0, {}, e), g = e.classNames.split(/\s/), h;
|
||||
this.each(function () {
|
||||
var b = a(this).tooltip().onBeforeShow(function (b, e) {
|
||||
var i = this.getTip(), j = this.getConf();
|
||||
h || (h = [j.position[0], j.position[1], j.offset[0], j.offset[1], a.extend({}, j)]), a.extend(j, h[4]), j.position = [h[0], h[1]], j.offset = [h[2], h[3]], i.css({visibility: "hidden", position: "absolute", top: e.top, left: e.left}).show();
|
||||
var k = a.extend(!0, {}, f), l = c(i);
|
||||
if (!d(l)) {
|
||||
l[2] && (a.extend(j, k.top), j.position[0] = "top", i.addClass(g[0])), l[3] && (a.extend(j, k.right), j.position[1] = "right", i.addClass(g[1])), l[0] && (a.extend(j, k.bottom), j.position[0] = "bottom", i.addClass(g[2])), l[1] && (a.extend(j, k.left), j.position[1] = "left", i.addClass(g[3]));
|
||||
if (l[0] || l[2])j.offset[0] *= -1;
|
||||
if (l[1] || l[3])j.offset[1] *= -1
|
||||
}
|
||||
i.css({visibility: "visible"}).hide()
|
||||
});
|
||||
b.onBeforeShow(function () {
|
||||
var a = this.getConf(), b = this.getTip();
|
||||
setTimeout(function () {
|
||||
a.position = [h[0], h[1]], a.offset = [h[2], h[3]]
|
||||
}, 0)
|
||||
}), b.onHide(function () {
|
||||
var a = this.getTip();
|
||||
a.removeClass(e.classNames)
|
||||
}), ret = b
|
||||
});
|
||||
return e.api ? ret : this
|
||||
}
|
||||
})(jQuery);
|
||||
(function (a) {
|
||||
var b = a.tools.tooltip;
|
||||
a.extend(b.conf, {direction: "up", bounce: !1, slideOffset: 10, slideInSpeed: 200, slideOutSpeed: 200, slideFade: true /*!(a.browser && a.browser.msie)*/});
|
||||
var c = {up: ["-", "top"], down: ["+", "top"], left: ["-", "left"], right: ["+", "left"]};
|
||||
b.addEffect("slide", function (a) {
|
||||
var b = this.getConf(), d = this.getTip(), e = b.slideFade ? {opacity: b.opacity} : {}, f = c[b.direction] || c.up;
|
||||
e[f[1]] = f[0] + "=" + b.slideOffset, b.slideFade && d.css({opacity: 0}), d.show().animate(e, b.slideInSpeed, a)
|
||||
}, function (b) {
|
||||
var d = this.getConf(), e = d.slideOffset, f = d.slideFade ? {opacity: 0} : {}, g = c[d.direction] || c.up, h = "" + g[0];
|
||||
d.bounce && (h = h == "+" ? "-" : "+"), f[g[1]] = h + "=" + e, this.getTip().animate(f, d.slideOutSpeed, function () {
|
||||
a(this).hide(), b.call()
|
||||
})
|
||||
})
|
||||
})(jQuery);
|
394
js/jquery.tools.min.js
vendored
394
js/jquery.tools.min.js
vendored
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -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 <s.herndler@methis.at>\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"
|
||||
|
|
Binary file not shown.
|
@ -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 <s.herndler@methis.at>\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"
|
||||
|
|
74
readme.txt
74
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.4
|
||||
Stable Tag: 2.1.1
|
||||
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 v2.0.5rc1, 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!
|
||||
|
||||
|
@ -82,19 +80,66 @@ 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 <https://wordpress.org/support/topic/auto-load-post-compatibility-update/>
|
||||
- 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.1.2 =
|
||||
- Bugfix: Dashboard: priority level settings for all other hooks, preventing them from being zeroed at save
|
||||
- Update: Dashboard: WordPress documentation URLs of the hooks
|
||||
- Update: Dashboard: feature description for the hooks priority level settings
|
||||
|
||||
= 2.1.1 =
|
||||
- Bugfix: Combining identical footnotes: fix dead links, ensure referrer-backlink bijectivity
|
||||
- Update: Libraries: jQuery Tools: redact jQuery.browser function use in js/jquery.tools.min.js
|
||||
- Update: Libraries: jQuery Tools: complete minification
|
||||
- Bugfix: Libraries: made script loads depend on tooltip implementation option
|
||||
- Bugfix: Libraries: jQuery UI: properly pick the libraries registered by WordPress needed for tooltips
|
||||
- Bugfix: UI: Tooltips: optional alternative JS implementation with CSS animation to fix site issues
|
||||
- Bugfix: UI: Tooltips: add delay (400ms) before fade-out to fix UX wrt links and Read-on button
|
||||
- Bugfix: UI: Tooltips: fix line breaking for hyperlinked URLs in Unicode-non-compliant user agents
|
||||
- Bugfix: Layout: Footnote referrers: select box to make superscript optional wrt themes w/o support
|
||||
- Bugfix: Layout: Reference container: fix relative positioning by priority level setting
|
||||
- Bugfix: Layout: Reference container: Backlink symbol: select box to disable instead of space character
|
||||
- Bugfix: Layout: Reference container: Footnote number links: disable bottom border for theme compatibility
|
||||
- Bugfix: Layout: Reference container: option to restore 3-column layout when combined are turned off
|
||||
- Bugfix: Layout: Reference container: option to APpend symbol in 2-column when combined are turned off
|
||||
- Bugfix: Layout: Reference container: fix start pages by an option to hide the reference container
|
||||
- Bugfix: Layout: Reference container: Table rows: fix top and bottom padding
|
||||
- Bugfix: Layout: Footnote referrers: new fix for line height
|
||||
- Bugfix: Formatting: disable overline showing in some themes on hovered backlinks
|
||||
|
||||
= 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: Dashboard: Layout: added named selectors to limit applicability of styles
|
||||
- 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)
|
||||
|
||||
= 2.0.7 =
|
||||
- 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
|
||||
|
||||
= 2.0.6 =
|
||||
- Update: Autoload / infinite scroll support thanks to @docteurfitness <https://wordpress.org/support/topic/auto-load-post-compatibility-update/>
|
||||
- Bugfix: Layout: Footnote referrers: deleted vertical align tweaks, for cross-theme and user agent compatibility
|
||||
- Bugfix: Layout: Reference container: fixed line breaking 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
|
||||
|
@ -111,7 +156,8 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
|
|||
- Update: Prepended transitional up arrow to backlinking footnote numbers after a user complaint about missing backlinking semantics of the footnote number
|
||||
- Bugfix: Fragment IDs: Prepended post ID to footnote number
|
||||
- Bugfix: Feed plugin version in style sheet query string for cache busting
|
||||
- Bugfix: Print style: Hide reference collapse button when printing
|
||||
- Bugfix: Print style: prevent a page break just after the reference container label
|
||||
- Bugfix: Print style: Hide reference collapse button
|
||||
- Update: Layout: Removed padding before reference container label
|
||||
|
||||
= 2.0.2 =
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
<table class="widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-enable]]</td>
|
||||
<td>[[enable]]</td>
|
||||
</tr>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-enable]]</td>
|
||||
<td>[[enable]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-alternative]]</td>
|
||||
<td>[[alternative]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-activate-excerpt]]</td>
|
||||
<td>[[activate-excerpt]]</td>
|
||||
|
@ -12,18 +16,22 @@
|
|||
<td>[[label-excerpt-length]]</td>
|
||||
<td>[[excerpt-length]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-position]]</td>
|
||||
<td>[[position]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-offset-x]]</td>
|
||||
<td>[[offset-x]] <em>[[notice-offset-x]]</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-offset-y]]</td>
|
||||
<td>[[offset-y]] <em>[[notice-offset-y]]</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-readon]]</td>
|
||||
<td>[[readon]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-position]]</td>
|
||||
<td>[[position]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-offset-x]]</td>
|
||||
<td>[[offset-x]] <em>[[notice-offset-x]]</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-offset-y]]</td>
|
||||
<td>[[offset-y]] <em>[[notice-offset-y]]</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-color]]</td>
|
||||
<td>[[color]] <em>[[notice-color]]</em></td>
|
||||
|
@ -48,9 +56,9 @@
|
|||
<td>[[label-max-width]]</td>
|
||||
<td>[[max-width]] <em>[[notice-max-width]]</em></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-box-shadow-color]]</td>
|
||||
<td>[[box-shadow-color]] <em>[[notice-box-shadow-color]]</em></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<tr>
|
||||
<td>[[label-box-shadow-color]]</td>
|
||||
<td>[[box-shadow-color]] <em>[[notice-box-shadow-color]]</em></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<table class="widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-superscript]]</td>
|
||||
<td>[[superscript]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-before]]</td>
|
||||
<td>[[before]]</td>
|
||||
|
@ -9,4 +13,4 @@
|
|||
<td>[[after]]</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
|
|
@ -1,41 +1,45 @@
|
|||
<table class="widefat fixed">
|
||||
<div class="expert-lookup footnotes-description">
|
||||
<p>[[description]]</p>
|
||||
</div>
|
||||
<table class="expert-lookup widefat fixed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 260px !important;">[[head-hook]]</th>
|
||||
<th style="width: 65px !important;">[[head-checkbox]]</th>
|
||||
<th style="white-space: nowrap;">[[head-url]]</th>
|
||||
<th>[[head-hook]]</th>
|
||||
<th>[[head-checkbox]]</th>
|
||||
<th>[[head-numbox]]</th>
|
||||
<th>[[head-url]]</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 260px !important;">[[label-the-title]]</td>
|
||||
<td style="width: 65px !important;">[[the-title]]</td>
|
||||
<td style="white-space: nowrap;"><a href="[[url-the-title]]" target="_blank">[[url-the-title]]</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 260px !important;">[[label-the-content]]</td>
|
||||
<td style="width: 65px !important;">[[the-content]]</td>
|
||||
<td style="white-space: nowrap;"><a href="[[url-the-content]]" target="_blank">[[url-the-content]]</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 260px !important;">[[label-the-excerpt]]</td>
|
||||
<td style="width: 65px !important;">[[the-excerpt]]</td>
|
||||
<td style="white-space: nowrap;"><a href="[[url-the-excerpt]]" target="_blank">[[url-the-excerpt]]</a></td>
|
||||
<td>[[label-the-title]]</td>
|
||||
<td>[[the-title]]</td>
|
||||
<td>[[priority-the-title]]</td>
|
||||
<td><a href="[[url-the-title]]" target="_blank">[[url-the-title]]</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 260px !important;">[[label-widget-title]]</td>
|
||||
<td style="width: 65px !important;">[[widget-title]]</td>
|
||||
<td style="white-space: nowrap;"><a href="[[url-widget-title]]" target="_blank">[[url-widget-title]]</a></td>
|
||||
<td>[[label-the-content]]</td>
|
||||
<td>[[the-content]]</td>
|
||||
<td>[[priority-the-content]]</td>
|
||||
<td><a href="[[url-the-content]]" target="_blank">[[url-the-content]]</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 260px !important;">[[label-widget-text]]</td>
|
||||
<td style="width: 65px !important;">[[widget-text]]</td>
|
||||
<td style="white-space: nowrap;"><a href="[[url-widget-text]]" target="_blank">[[url-widget-text]]</a></td>
|
||||
<td>[[label-the-excerpt]]</td>
|
||||
<td>[[the-excerpt]]</td>
|
||||
<td>[[priority-the-excerpt]]</td>
|
||||
<td><a href="[[url-the-excerpt]]" target="_blank">[[url-the-excerpt]]</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 260px !important;">[[label-post-object]]</td>
|
||||
<td style="width: 65px !important;">[[post-object]]</td>
|
||||
<td style="white-space: nowrap;"><a href="[[url-post-object]]" target="_blank">[[url-post-object]]</a></td>
|
||||
<td>[[label-widget-title]]</td>
|
||||
<td>[[widget-title]]</td>
|
||||
<td>[[priority-widget-title]]</td>
|
||||
<td><a href="[[url-widget-title]]" target="_blank">[[url-widget-title]]</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<tr>
|
||||
<td>[[label-widget-text]]</td>
|
||||
<td>[[widget-text]]</td>
|
||||
<td>[[priority-widget-text]]</td>
|
||||
<td><a href="[[url-widget-text]]" target="_blank">[[url-widget-text]]</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -8,9 +8,25 @@
|
|||
<td>[[label-collapse]]</td>
|
||||
<td>[[collapse]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-3column]]</td>
|
||||
<td>[[3column]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-symbol]]</td>
|
||||
<td>[[symbol]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-switch]]</td>
|
||||
<td>[[switch]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-position]]</td>
|
||||
<td>[[position]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-startpage]]</td>
|
||||
<td>[[startpage]]</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
|
|
16
templates/public/footnote-alternative.html
Normal file
16
templates/public/footnote-alternative.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<span
|
||||
class="footnote_referrer relative"
|
||||
onmouseover="footnoteTooltipShow('footnote_plugin_tooltip_text_[[post_id]]_[[id]]')"
|
||||
onmouseout="footnoteTooltipHide('footnote_plugin_tooltip_text_[[post_id]]_[[id]]')"
|
||||
><a><[[element]]
|
||||
id="footnote_plugin_tooltip_[[post_id]]_[[id]]"
|
||||
class="footnote_plugin_tooltip_text"
|
||||
onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_reference_[[post_id]]_[[id]]');"
|
||||
>[[before]][[index]][[after]]</[[element]]
|
||||
></a><span
|
||||
id="footnote_plugin_tooltip_text_[[post_id]]_[[id]]"
|
||||
class="footnote_tooltip position hidden"
|
||||
onmouseout="footnoteTooltipHide('footnote_plugin_tooltip_text_[[post_id]]_[[id]]')"
|
||||
>[[text]]</span
|
||||
></span
|
||||
>
|
|
@ -1,13 +1,13 @@
|
|||
<a
|
||||
><sup
|
||||
<span
|
||||
class="footnote_referrer"
|
||||
><a><[[element]]
|
||||
id="footnote_plugin_tooltip_[[post_id]]_[[id]]"
|
||||
class="footnote_plugin_tooltip_text"
|
||||
onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_reference_[[post_id]]_[[id]]');"
|
||||
>[[before]][[index]][[after]]</sup
|
||||
></a
|
||||
>
|
||||
<span
|
||||
class="footnote_tooltip"
|
||||
id="footnote_plugin_tooltip_text_[[post_id]]_[[id]]"
|
||||
>[[text]]</span
|
||||
>[[before]][[index]][[after]]</[[element]]
|
||||
></a><span
|
||||
id="footnote_plugin_tooltip_text_[[post_id]]_[[id]]"
|
||||
class="footnote_tooltip"
|
||||
>[[text]]</span
|
||||
></span
|
||||
>
|
||||
|
|
21
templates/public/reference-container-body-3column.html
Normal file
21
templates/public/reference-container-body-3column.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
<tr>
|
||||
<td
|
||||
class="footnote_plugin_index"
|
||||
><span
|
||||
id="footnote_plugin_reference_[[post_id]]_[[id]]"
|
||||
class="footnote_index"
|
||||
onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_tooltip_[[post_id]]_[[id]]');"
|
||||
>[[index]].</span
|
||||
></td>
|
||||
<td
|
||||
class="footnote_plugin_link"
|
||||
><span
|
||||
onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_tooltip_[[post_id]]_[[id]]');"
|
||||
class="footnote_backlink"
|
||||
>[[arrow]]</span
|
||||
></td>
|
||||
<td
|
||||
class="footnote_plugin_text"
|
||||
>[[text]]</td
|
||||
>
|
||||
</tr>
|
8
templates/public/reference-container-body-combi.html
Normal file
8
templates/public/reference-container-body-combi.html
Normal file
|
@ -0,0 +1,8 @@
|
|||
<tr>
|
||||
<td
|
||||
class="footnote_plugin_index_combi"
|
||||
>[[backlinks]]</td>
|
||||
<td
|
||||
class="footnote_plugin_text"
|
||||
>[[text]]</td>
|
||||
</tr>
|
13
templates/public/reference-container-body-switch.html
Normal file
13
templates/public/reference-container-body-switch.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<tr>
|
||||
<td
|
||||
id="footnote_plugin_reference_[[post_id]]_[[id]]"
|
||||
class="footnote_plugin_index pointer"
|
||||
onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_tooltip_[[post_id]]_[[id]]');"
|
||||
><span
|
||||
class="footnote_plugin_link"
|
||||
>[[index]].[[arrow]]</span
|
||||
></td>
|
||||
<td
|
||||
class="footnote_plugin_text"
|
||||
>[[text]]</td>
|
||||
</tr>
|
|
@ -1,13 +1,11 @@
|
|||
<tr>
|
||||
<td
|
||||
class="footnote_plugin_index footnote_plugin_link"
|
||||
id="footnote_plugin_reference_[[post_id]]_[[id]]"
|
||||
class="footnote_plugin_index pointer"
|
||||
onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_tooltip_[[post_id]]_[[id]]');"
|
||||
><a
|
||||
><span
|
||||
class="footnote_plugin_index_arrow"
|
||||
>[[arrow]] </span
|
||||
>[[index]].</a
|
||||
><a
|
||||
class="footnote_plugin_link"
|
||||
>[[arrow]][[index]]</a
|
||||
></td>
|
||||
<td
|
||||
class="footnote_plugin_text"
|
||||
|
|
|
@ -1,21 +1,31 @@
|
|||
<div class="footnote_container_overall_wrapper">
|
||||
<div class="footnote_container_prepare">
|
||||
<p><span
|
||||
onclick="footnote_expand_reference_container_[[post_id]]();"
|
||||
>[[label]]</span
|
||||
<div
|
||||
class="speaker-mute footnotes_reference_container"
|
||||
>
|
||||
<div
|
||||
class="footnote_container_prepare"
|
||||
><p
|
||||
><span
|
||||
class="footnote_reference_container_label"
|
||||
onclick="footnote_expand_reference_container_[[post_id]]();"
|
||||
>[[label]]</span
|
||||
><span
|
||||
class="footnote_reference_container_collapse_button"
|
||||
style="[[button-style]]"
|
||||
onclick="footnote_expand_collapse_reference_container_[[post_id]]();"
|
||||
> [<a
|
||||
>[<a
|
||||
id="footnote_reference_container_collapse_button_[[post_id]]"
|
||||
> + </a
|
||||
>+</a
|
||||
>]</span
|
||||
></p
|
||||
></div
|
||||
>
|
||||
<div
|
||||
id="footnote_references_container_[[post_id]]"
|
||||
style="[[style]]"
|
||||
>
|
||||
<table
|
||||
class="footnote-reference-container"
|
||||
>
|
||||
</div>
|
||||
<div id="footnote_references_container_[[post_id]]" style="[[style]]">
|
||||
<table class="footnote-reference-container">
|
||||
<tbody>
|
||||
[[content]]
|
||||
</tbody>
|
||||
|
@ -25,11 +35,11 @@
|
|||
<script type="text/javascript">
|
||||
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')) {
|
||||
|
@ -47,5 +57,5 @@
|
|||
},
|
||||
380);/*speed*/
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
effect: 'fade',
|
||||
predelay: 0,
|
||||
fadeInSpeed: 200,
|
||||
delay: 400,
|
||||
fadeOutSpeed: 200,
|
||||
position: '[[position]]',
|
||||
relative: true,
|
||||
|
|
Reference in a new issue