diff --git a/class/dashboard/layout.php b/class/dashboard/layout.php
index b01be16..4b73596 100644
--- a/class/dashboard/layout.php
+++ b/class/dashboard/layout.php
@@ -207,7 +207,7 @@ abstract class MCI_Footnotes_LayoutEngine {
'mci-footnotes-admin-styles',
plugins_url('../../css/settings.css', __FILE__),
'',
- '2.1.4d1'
+ '2.1.4d2'
);
// UPDATE version # when making changes to settings.css, FOR CACHE BUSTING
diff --git a/class/dashboard/subpage-main.php b/class/dashboard/subpage-main.php
index aa2fcfd..3000360 100644
--- a/class/dashboard/subpage-main.php
+++ b/class/dashboard/subpage-main.php
@@ -11,8 +11,9 @@
* 2.1.0 2020-11-08T2148+0100
* 2.1.1 2020-11-16T2152+0100
* 2.1.3 2020-11-24T0955+0100
+ * 2.1.4 2020-11-26T1052+0100
*
- * Last modified: 2020-11-24T0955+0100
+ * Last modified: 2020-11-26T1052+0100
*/
/**
@@ -89,9 +90,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
// 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"),
+ $this->addMetaBox("settings", "other", __("Other", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Other"),
// Leave intact since this is not localized:
$this->addMetaBox("settings", "love", MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, "Love"),
- $this->addMetaBox("settings", "other", __("Other", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Other"),
// This is restored to meet user demand for arrow symbol semantics:
$this->addMetaBox("customize", "hyperlink-arrow", __("Hyperlink symbol in the Reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "HyperlinkArrow"),
@@ -276,6 +277,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
// replace all placeholders
$l_obj_Template->replace(
array(
+ "label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
+ "link" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, $l_arr_Enabled),
"label-excerpt" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, __("Allow footnotes on Summarized Posts", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"excerpt" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, $l_arr_Enabled),
"label-expert-mode" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_EXPERT_MODE, __("Enable the Expert mode", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
@@ -493,13 +496,11 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
$l_obj_Template->replace(
array(
- "description-1" => __("The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
- "description-2" => __("Default 9223372036854775807 is lowest priority, 0 is highest.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
- "description-3" => __("To restore default priority, set to -1, interpreted as 9223372036854775807, the constant PHP_INT_MAX.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
- "description-4" => __("For the reference container to sit above related posts, the priority level of the_content hook may need to be at most 1200.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
- "description-5" => __("For Footnotes to work when a glossary plugin is active, a higher priority of 1000 may be needed.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
- "description-6" => __("For the_content, another good pick with proven efficiency is priority level 10.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
- "description-7" => __("Usually only the_content should be enabled; widget_text may cause issues in accordions, the_title causes issues in browser tabs.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
+ "description-1" => __("The priority level determines whether Footnotes is executed timely before other plugins, and how the reference container is positioned relative to other features", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
+ "description-2" => __("Default 9223372036854775807 is lowest priority, 0 is highest", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
+ "description-3" => __("To restore default priority, set to -1, interpreted as 9223372036854775807, the constant PHP_INT_MAX", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
+ "description-4" => __("For the_content, this figure needs to be lower than 1200 to make sure that a feature inserted by another plugin running at 1200 displays below the reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
+ "description-5" => __("For Elementor accordions, the widget_text hook must be disabled", 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),
diff --git a/class/init.php b/class/init.php
index 0a2c67e..4720164 100644
--- a/class/init.php
+++ b/class/init.php
@@ -160,7 +160,7 @@ class MCI_Footnotes {
'mci-footnotes-css-public',
plugins_url('../css/public.css', __FILE__),
'',
- '2.1.4d1'
+ '2.1.4d2'
);
}
diff --git a/class/settings.php b/class/settings.php
index 1a7f2ec..3b6252c 100644
--- a/class/settings.php
+++ b/class/settings.php
@@ -373,7 +373,7 @@ class MCI_Footnotes_Settings {
const C_STR_FOOTNOTES_TOOLTIP_READON_LABEL = "footnote_inputfield_readon_label";
/**
- * Settings Container Keys of options fixing default layout
+ * Settings Container Keys for options fixing default layout
*
* @since 2.1.1
* @var string
@@ -381,18 +381,37 @@ class MCI_Footnotes_Settings {
* 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";
+ /**
+ * Settings Container Keys for hook priority levels
+ *
+ * @since 2.1.1 (the_content)
+ * @since 2.1.2
+ * @var string
+ *
+ * 2020-11-16T0859+0100
+ * 2020-11-20T0620+0100
+ */
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";
+ /**
+ * Settings Container Keys for the link element option
+ *
+ * @since 2.1.4
+ * @var string
+ *
+ * 2020-11-26T1002+0100
+ */
+ const C_BOOL_LINK_ELEMENT_ENABLED = "footnote_inputfield_link_element_enabled";
+
/**
@@ -434,6 +453,8 @@ class MCI_Footnotes_Settings {
self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no',
self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no',
+ self::C_BOOL_LINK_ELEMENT_ENABLED => 'yes',
+
self::C_STR_FOOTNOTES_SHORT_CODE_START => '((',
self::C_STR_FOOTNOTES_SHORT_CODE_END => '))',
self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '',
diff --git a/class/task.php b/class/task.php
index 405310e..ee9e9c9 100644
--- a/class/task.php
+++ b/class/task.php
@@ -18,8 +18,9 @@
* 2.1.1: option fixing ref container relative position 2020-11-17T0254+0100
* 2.1.2: options for the other hooks 2020-11-19T1849+0100
* 2.1.4: fix line wrapping of URLs based on pattern, not link element 2020-11-25T0837+0100
+ * 2.1.4: fix issues with link elements by making them optional 2020-11-26T1051+0100
*
- * Last modified: 2020-11-26T0036+0100
+ * Last modified: 2020-11-26T1051+0100
*/
// If called directly, abort:
@@ -484,16 +485,17 @@ class MCI_Footnotes_Task {
$l_str_SupSpan = 'span';
}
- // determine whether the link element is used, see below
-
-
+ // determine whether the link element is used, see below in ReferenceContainer()
+ $l_str_LinkSpan = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED)) ? 'a' : 'span';
+
+
// fill in 'templates/public/footnote.html':
$l_obj_Template->replace(
array(
"post_id" => $l_int_PostId,
"id" => $l_int_Index,
- "link-start" => '',
- "link-end" => '',
+ "link-start" => $l_str_LinkSpan == 'a' ? '' : '',
+ "link-end" => $l_str_LinkSpan == 'a' ? '' : '',
"sup-span" => $l_str_SupSpan,
"before" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE),
"index" => $l_int_Index,
@@ -563,7 +565,7 @@ class MCI_Footnotes_Task {
/**
* INFINITE SCROLL / AUTOLOAD, ARCHIVE VIEW
- *
+ *
* Multiple posts are appended to each other, functions and IDs must be disambiguated.
* Contributed by @docteurfitness [[description-1]] [[description-2]] [[description-3]] [[description-4]] [[description-5]] [[description-6]] [[description-7]] [[description-1]]. [[description-2]]. [[description-3]]. [[description-4]]. [[description-5]].
[[label-link]] | +[[link]] | +|
[[label-excerpt]] | [[excerpt]] | @@ -9,4 +13,4 @@[[expert-mode]] |