stable bugfix release 2.1.1
git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2420456 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
1e0c8a3a89
commit
e3cb392ace
9 changed files with 57 additions and 62 deletions
|
@ -302,7 +302,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
// replace all placeholders
|
||||
$l_obj_Template->replace(
|
||||
array(
|
||||
"label-superscript" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __("Enable superscript footnote referrers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"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)),
|
||||
|
@ -489,8 +489,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
"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),
|
||||
"priority-the-content" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL, 0, PHP_INT_MAX),
|
||||
"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" => "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"),
|
||||
|
|
|
@ -159,7 +159,7 @@ class MCI_Footnotes {
|
|||
'mci-footnotes-css-public',
|
||||
plugins_url('../css/public.css', __FILE__),
|
||||
'',
|
||||
'2.1.1d10'
|
||||
'2.1.1'
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* 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-17T0255+0100
|
||||
* Last modified 2020-11-18T0138+0100
|
||||
*/
|
||||
|
||||
// If called directly, abort:
|
||||
|
@ -76,6 +76,16 @@ class MCI_Footnotes_Task {
|
|||
* See <https://wordpress.org/support/topic/change-the-position-5/#post-13612697>
|
||||
*/
|
||||
public function registerHooks() {
|
||||
|
||||
// first compute values from settings:
|
||||
// for now only the_content is supported for customization:
|
||||
$p_int_TheContentPriority = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL);
|
||||
|
||||
// PHP_INT_MAX can be set using the value -1:
|
||||
if ( $p_int_TheContentPriority == -1 ) {
|
||||
$p_int_TheContentPriority = PHP_INT_MAX;
|
||||
}
|
||||
|
||||
// append custom css to the header
|
||||
add_filter('wp_head', array($this, "wp_head"), PHP_INT_MAX);
|
||||
|
||||
|
@ -88,7 +98,7 @@ class MCI_Footnotes_Task {
|
|||
|
||||
// SET PRIORITY LEVEL TO CUSTOM FOR PAGE LAYOUT; 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"), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL));
|
||||
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);
|
||||
|
@ -525,7 +535,7 @@ class MCI_Footnotes_Task {
|
|||
|
||||
// FOOTNOTE INDEX BACKLINK SYMBOL
|
||||
|
||||
// check if arrow is not disabled:
|
||||
// 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
|
||||
|
|
Reference in a new issue