Wasn’t actually rolled out! So, 2.1.2 gets deleted; wasn’t ready, BTW… Waiting for 2.2.0 to complete!

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2421833 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
pewgeuges 2020-11-19 20:34:45 +00:00
parent ef544eb760
commit 0520655f1c
11 changed files with 79 additions and 173 deletions

View file

@ -411,10 +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', incompatible with combined identical footnotes,
* became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics
* of the footnote number.
* 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
@ -473,56 +473,38 @@ 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),
"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/",
"url-the-title" => "http://codex.wordpress.org/Plugin_API/Filter_Reference/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),
"the-content" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_EXPERT_LOOKUP_THE_CONTENT),
// allowed for priority level are all positive integers, zero and -1 interpreted as PHP_INT_MAX:
"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/",
"url-the-content" => "http://codex.wordpress.org/Plugin_API/Filter_Reference/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),
"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/",
"url-the-excerpt" => "http://codex.wordpress.org/Function_Reference/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),
"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",
"url-widget-title" => "http://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),
"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",
"url-widget-text" => "http://codex.wordpress.org/Plugin_API/Filter_Reference/widget_text",
)
);
// display template with replaced placeholders