development 2.2.0d8 with update readme “Tested up to: 5.6”. Please test UI redesign prior to adding the missing settings
git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2438063 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
0911777bc1
commit
391cce446a
27 changed files with 858 additions and 636 deletions
|
@ -5,6 +5,11 @@
|
|||
* @filesource
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0 12.09.14 10:56
|
||||
*
|
||||
* Edited:
|
||||
* @since 2.2.0 add lowercase Roman 2020-12-12T1540+0100
|
||||
*
|
||||
* Last modified: 2020-12-12T1541+0100
|
||||
*/
|
||||
|
||||
|
||||
|
@ -24,11 +29,16 @@ class MCI_Footnotes_Convert {
|
|||
* @param int $p_int_Index Index to be converted.
|
||||
* @param string $p_str_ConvertStyle Style of the new/converted Index.
|
||||
* @return string Converted Index as string in the defined counter style.
|
||||
*
|
||||
* Edited:
|
||||
* @since 2.2.0 lowercase Roman numerals supported
|
||||
*/
|
||||
public static function Index($p_int_Index, $p_str_ConvertStyle = "arabic_plain") {
|
||||
switch ($p_str_ConvertStyle) {
|
||||
case "romanic":
|
||||
return self::toRomanic($p_int_Index);
|
||||
return self::toRomanic($p_int_Index, true);
|
||||
case "roman_low":
|
||||
return self::toRomanic($p_int_Index, false);
|
||||
case "latin_high":
|
||||
return self::toLatin($p_int_Index, true);
|
||||
case "latin_low":
|
||||
|
@ -97,8 +107,11 @@ class MCI_Footnotes_Convert {
|
|||
* @since 1.0-gamma
|
||||
* @param int $p_int_Value Value/Index to be converted.
|
||||
* @return string
|
||||
*
|
||||
* Edited:
|
||||
* @since 2.2.0 optionally lowercase (code from Latin) 2020-12-12T1538+0100
|
||||
*/
|
||||
private static function toRomanic($p_int_Value) {
|
||||
private static function toRomanic($p_int_Value, $p_bool_UpperCase) {
|
||||
// table containing all necessary romanic letters
|
||||
$l_arr_RomanicLetters = array(
|
||||
'M' => 1000,
|
||||
|
@ -128,7 +141,10 @@ class MCI_Footnotes_Convert {
|
|||
}
|
||||
}
|
||||
// return romanic letters as string
|
||||
return $l_str_Return;
|
||||
if ($p_bool_UpperCase) {
|
||||
return strtoupper($l_str_Return);
|
||||
}
|
||||
return strtolower($l_str_Return);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
* 2.1.2 add versioning of settings.css for cache busting 2020-11-19T1456+0100
|
||||
* 2.1.4 automate passing version number for cache busting 2020-11-30T0648+0100
|
||||
* 2.1.4 optional step argument and support for floating in numbox 2020-12-05T0540+0100
|
||||
* 2.2.0 fix punctuation-related localization issue in dashboard labels 2020-12-08T1547+0100
|
||||
* 2.1.6 fix punctuation-related localization issue in dashboard labels 2020-12-08T1547+0100
|
||||
*
|
||||
* Last modified: 2020-12-08T1547+0100
|
||||
* Last modified: 2020-12-10T1447+0100
|
||||
*/
|
||||
|
||||
|
||||
|
@ -114,7 +114,12 @@ abstract class MCI_Footnotes_LayoutEngine {
|
|||
* @return array meta box description to be able to append a meta box to the output.
|
||||
*/
|
||||
protected function addMetaBox($p_str_SectionID, $p_str_ID, $p_str_Title, $p_str_CallbackFunctionName) {
|
||||
return array("parent" => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_SectionID, "id" => $p_str_ID, "title" => $p_str_Title, "callback" => $p_str_CallbackFunctionName);
|
||||
return array(
|
||||
"parent" => MCI_Footnotes_Config::C_STR_PLUGIN_NAME . "-" . $p_str_SectionID,
|
||||
"id" => $p_str_ID,
|
||||
"title" => $p_str_Title,
|
||||
"callback" => $p_str_CallbackFunctionName
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -379,8 +384,8 @@ abstract class MCI_Footnotes_LayoutEngine {
|
|||
* @param string $p_str_Caption Label caption.
|
||||
* @return string
|
||||
*
|
||||
* Edited 2020-12-01T0159+0100
|
||||
* @since #################### no colon
|
||||
* Edited 2020-12-01T0159+0100..
|
||||
* @since 2.1.6 no colon
|
||||
*/
|
||||
protected function addLabel($p_str_SettingName, $p_str_Caption) {
|
||||
if (empty($p_str_Caption)) {
|
||||
|
@ -394,6 +399,7 @@ abstract class MCI_Footnotes_LayoutEngine {
|
|||
// and narrow per new school.
|
||||
// Add colon to label strings for inclusion in localization.
|
||||
// Colon after label is widely preferred best practice, mandatory per style guides.
|
||||
// <https://softwareengineering.stackexchange.com/questions/234546/colons-in-internationalized-ui>
|
||||
return sprintf('<label for="%s">%s</label>', $p_str_SettingName, $p_str_Caption);
|
||||
// ^ here deleted colon 2020-12-08T1546+0100
|
||||
}
|
||||
|
@ -504,14 +510,14 @@ abstract class MCI_Footnotes_LayoutEngine {
|
|||
* @return string
|
||||
*
|
||||
* Edited:
|
||||
* @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-05T2006+0100
|
||||
* @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-12T1110+0100
|
||||
*/
|
||||
protected function addNumBox($p_str_SettingName, $p_in_Min, $p_int_Max, $p_bool_Deci = false ) {
|
||||
// collect data for given settings field
|
||||
$l_arr_Data = $this->LoadSetting($p_str_SettingName);
|
||||
|
||||
if ($p_bool_Deci) {
|
||||
$l_str_Value = number_format($l_arr_Data["value"], 1);
|
||||
$l_str_Value = number_format(floatval($l_arr_Data["value"]), 1);
|
||||
return sprintf('<input type="number" name="%s" id="%s" value="%s" step="0.1" min="%d" max="%d"/>',
|
||||
$l_arr_Data["name"], $l_arr_Data["id"], $l_str_Value, $p_in_Min, $p_int_Max);
|
||||
} else {
|
||||
|
|
|
@ -11,11 +11,12 @@
|
|||
* 2.1.0 read-on button label 2020-11-08T2148+0100
|
||||
* 2.1.1 options for ref container and alternative tooltips 2020-11-16T2152+0100
|
||||
* 2.1.4 settings for ref container, tooltips and scrolling 2020-12-03T0950+0100
|
||||
* 2.2.0 slight UI reordering 2020-12-09T1114+0100
|
||||
* 2.2.0 option to disable URL line wrapping 2020-12-09T1604+0100
|
||||
* 2.2.0 remove expert mode setting as irrelevant 2020-12-09T2105+0100
|
||||
* 2.1.6 slight UI reordering 2020-12-09T1114+0100
|
||||
* 2.1.6 option to disable URL line wrapping 2020-12-09T1604+0100
|
||||
* 2.1.6 remove expert mode setting as irrelevant 2020-12-09T2105+0100
|
||||
* 2.2.0 add options, redistribute, update strings 2020-12-12T2135+0100
|
||||
*
|
||||
* Last modified: 2020-12-09T2105+0100
|
||||
* Last modified: 2020-12-12T2202+0100
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -65,13 +66,20 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @return array
|
||||
*
|
||||
* Edited:
|
||||
* 2.1.6 tabs reordered and renamed
|
||||
* @see customization vs configuration
|
||||
* <https://www.linkedin.com/pulse/20140610191154-4746170-configuration-vs-customization-when-and-why-would-i-implement-each>
|
||||
*
|
||||
* 2.1.6 removed if statement around expert tab
|
||||
*/
|
||||
protected function getSections() {
|
||||
$l_arr_Tabs = array();
|
||||
$l_arr_Tabs[] = $this->addSection("settings", __("Settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 0, true);
|
||||
$l_arr_Tabs[] = $this->addSection("expert", __("Priority", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 2, true);
|
||||
$l_arr_Tabs[] = $this->addSection("customize", __("Configure", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 1, true);
|
||||
$l_arr_Tabs[] = $this->addSection("how-to", __("How to", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false);
|
||||
$l_arr_Tabs[] = $this->addSection("settings", __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 0, true);
|
||||
$l_arr_Tabs[] = $this->addSection("customize", __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 1, true);
|
||||
$l_arr_Tabs[] = $this->addSection("expert", __("Priority and CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 2, true);
|
||||
$l_arr_Tabs[] = $this->addSection("how-to", __("Quick start guide", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false);
|
||||
return $l_arr_Tabs;
|
||||
}
|
||||
|
||||
|
@ -82,27 +90,37 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
* @since 1.5.0
|
||||
* @return array
|
||||
*
|
||||
* Edited for v2.0.4 to reflect changes in display since WPv5.5
|
||||
* Details in class/config.php
|
||||
* Edited for 2.0.0 and later.
|
||||
*
|
||||
* HyperlinkArrow meta box:
|
||||
* @since 2.0.0 discontinued
|
||||
* @since 2.0.4 restored to meet user demand for arrow symbol semantics
|
||||
* @since 2.1.4 discontinued, content moved to Settings > Reference container > Display a backlink symbol
|
||||
*
|
||||
* @since 2.0.4 to reflect changes in meta box label display since WPv5.5
|
||||
* spans need position:fixed and become unlocalizable
|
||||
* fix: logo is kept only in the label that doesn’t need to be translated:
|
||||
* Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5
|
||||
* @see details in class/config.php
|
||||
*
|
||||
* @since 2.1.6 / 2.2.0 tabs reordered and renamed
|
||||
*/
|
||||
protected function getMetaBoxes() {
|
||||
return array(
|
||||
// Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5:
|
||||
$this->addMetaBox("settings", "styling", __("Main settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Styling"),
|
||||
$this->addMetaBox("settings", "reference-container", __("Reference Container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "ReferenceContainer"),
|
||||
$this->addMetaBox("settings", "other", __("Other settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Other"),
|
||||
// Leave intact since this is not localized:
|
||||
$this->addMetaBox("settings", "start-end", __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "StartEnd"),
|
||||
$this->addMetaBox("settings", "numbering", __("Footnotes numbering", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Numbering"),
|
||||
$this->addMetaBox("settings", "scrolling", __("Scrolling behavior", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Scrolling"),
|
||||
$this->addMetaBox("settings", "reference-container", __("Reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "ReferenceContainer"),
|
||||
$this->addMetaBox("settings", "excerpts", __("Footnotes in excerpts", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Excerpts"),
|
||||
$this->addMetaBox("settings", "love", MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, "Love"),
|
||||
|
||||
$this->addMetaBox("expert", "lookup", __("WordPress hooks and priority levels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "lookupHooks"),
|
||||
$this->addMetaBox("customize", "superscript", __("Referrer typesetting and formatting", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Superscript"),
|
||||
$this->addMetaBox("customize", "mouse-over-box-display", __("Tooltip display", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxDisplay"),
|
||||
$this->addMetaBox("customize", "mouse-over-box-truncation", __("Tooltip truncation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTruncation"),
|
||||
$this->addMetaBox("customize", "mouse-over-box-appearance", __("Tooltip appearance", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxAppearance"),
|
||||
|
||||
// The HyperlinkArrow meta box ceased for 2.0.0
|
||||
// The HyperlinkArrow meta box was restored for 2.0.4 to meet user demand for arrow symbol semantics
|
||||
// The HyperlinkArrow meta box ceased for 2.1.4 as its content is moved to Settings > Reference container > Display a backlink symbol
|
||||
$this->addMetaBox("customize", "superscript", __("Referrer typesetting", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Superscript"),
|
||||
$this->addMetaBox("customize", "mouse-over-box", __("Mouse-over box", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBox"),
|
||||
|
||||
$this->addMetaBox("customize", "custom-css", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSS"),
|
||||
$this->addMetaBox("expert", "lookup", __("WordPress hooks and priority levels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "LookupHooks"),
|
||||
$this->addMetaBox("expert", "custom-css", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSS"),
|
||||
|
||||
$this->addMetaBox("how-to", "help", __("Brief introduction in how to use the plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Help"),
|
||||
$this->addMetaBox("how-to", "donate", __("Help us to improve our Plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Donate")
|
||||
|
@ -179,6 +197,10 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
"page-layout" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_PageLayoutOptions),
|
||||
"notice-page-layout" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
|
||||
"label-url-wrap" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, __("Allow URLs to line-wrap anywhere:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"url-wrap" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_Enabled),
|
||||
"notice-url-wrap" => __("Unicode-conformant browsers don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
|
||||
"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),
|
||||
|
||||
|
@ -221,6 +243,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
|
||||
"label-line-break" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, __("Stack backlinks when enumerating:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"line-break" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED, $l_arr_Enabled),
|
||||
"notice-line-break" => __("This option adds a line break before each added backlink when identical footnotes are combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
)
|
||||
);
|
||||
// display template with replaced placeholders
|
||||
|
@ -228,44 +251,51 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
}
|
||||
|
||||
/**
|
||||
* Displays all settings for the footnotes styling.
|
||||
* Displays all options for the footnotes start and end tag short codes
|
||||
* Displays all options for the footnotes numbering
|
||||
* Displays all options for the scrolling behavior
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*
|
||||
* Edited heading 2020-12-12T1412+0100
|
||||
* @since 2.2.0 more short code options 2020-12-12T1412+0100
|
||||
* @since 2.2.0 3 boxes for clarity 2020-12-12T1422+0100
|
||||
*/
|
||||
public function Styling() {
|
||||
// define some space for the output
|
||||
$l_str_Space = " ";
|
||||
// options for the combination of identical footnotes
|
||||
$l_arr_Enable = array(
|
||||
"yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
|
||||
);
|
||||
// options for the start of the footnotes short code
|
||||
public function StartEnd() {
|
||||
// footnotes start tag short code options:
|
||||
$l_arr_ShortCodeStart = array(
|
||||
"((" => "((",
|
||||
"(((" => "(((",
|
||||
"{{" => "{{",
|
||||
"{{{" => "{{{",
|
||||
"[n]" => "[n]",
|
||||
"[fn]" => "[fn]",
|
||||
htmlspecialchars("<fn>") => htmlspecialchars("<fn>"),
|
||||
"[ref]" => "[ref]",
|
||||
"userdefined" => __('user defined', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
|
||||
htmlspecialchars("<ref>") => htmlspecialchars("<ref>"),
|
||||
htmlspecialchars("<!--n>") => htmlspecialchars("<!--n>"),
|
||||
// Custom (user-defined) start and end tags bracketing the footnote text inline:
|
||||
"userdefined" => __('custom short code', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
|
||||
);
|
||||
// options for the end of the footnotes short code
|
||||
// footnotes end tag short code options:
|
||||
$l_arr_ShortCodeEnd = array(
|
||||
"))" => "))",
|
||||
")))" => ")))",
|
||||
"}}" => "}}",
|
||||
"}}}" => "}}}",
|
||||
"[/n]" => "[/n]",
|
||||
"[/fn]" => "[/fn]",
|
||||
htmlspecialchars("</fn>") => htmlspecialchars("</fn>"),
|
||||
"[/ref]" => "[/ref]",
|
||||
"userdefined" => __('user defined', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
|
||||
);
|
||||
// options for the counter style of the footnotes
|
||||
$l_arr_CounterStyle = array(
|
||||
"arabic_plain" => __("Arabic Numbers - Plain", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "1, 2, 3, 4, 5, ...",
|
||||
"arabic_leading" => __("Arabic Numbers - Leading 0", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "01, 02, 03, 04, 05, ...",
|
||||
"latin_low" => __("Latin Character - lower case", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "a, b, c, d, e, ...",
|
||||
"latin_high" => __("Latin Character - upper case", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "A, B, C, D, E, ...",
|
||||
"romanic" => __("Roman Numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "I, II, III, IV, V, ..."
|
||||
htmlspecialchars("</ref>") => htmlspecialchars("</ref>"),
|
||||
htmlspecialchars("<n-->") => htmlspecialchars("<n-->"),
|
||||
// Custom (user-defined) start and end tags bracketing the footnote text inline:
|
||||
"userdefined" => __('custom short code', MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
|
||||
);
|
||||
|
||||
// load template file
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-styling");
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-start-end");
|
||||
// replace all placeholders
|
||||
$l_obj_Template->replace(
|
||||
array(
|
||||
|
@ -283,12 +313,58 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
"short-code-start-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED,
|
||||
"short-code-end-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED,
|
||||
|
||||
"label-counter-style" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, __("Counter style:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
)
|
||||
);
|
||||
// display template with replaced placeholders
|
||||
echo $l_obj_Template->getContent();
|
||||
}
|
||||
|
||||
public function Numbering() {
|
||||
// define some space for the output
|
||||
$l_str_Space = " ";
|
||||
// options for the combination of identical footnotes
|
||||
$l_arr_Enable = array(
|
||||
"yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
|
||||
);
|
||||
// options for the numbering style of the footnotes:
|
||||
$l_arr_CounterStyle = array(
|
||||
"arabic_plain" => __("plain Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "1, 2, 3, 4, 5, …",
|
||||
"arabic_leading" => __("zero-padded Arabic numbers", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "01, 02, 03, 04, 05, …",
|
||||
"latin_low" => __("lowercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "a, b, c, d, e, …",
|
||||
"latin_high" => __("uppercase Latin letters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "A, B, C, D, E, …",
|
||||
"romanic" => __("uppercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "I, II, III, IV, V, …",
|
||||
"roman_low" => __("lowercase Roman numerals", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . $l_str_Space . "i, ii, iii, iv, v, …",
|
||||
);
|
||||
|
||||
// load template file
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-numbering");
|
||||
// replace all placeholders
|
||||
$l_obj_Template->replace(
|
||||
array(
|
||||
"label-counter-style" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, __("Numbering style:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"counter-style" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, $l_arr_CounterStyle),
|
||||
|
||||
// algorithmically combine identicals:
|
||||
"label-identical" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, __("Combine identical footnotes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"identical" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES, $l_arr_Enable),
|
||||
"notice-identical" => __("This option may require copy-pasting footnotes in multiple instances.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"description1-identical" => __("Even when footnotes are combined, footnote numbers keep incrementing.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"description2-identical" => __("This avoids suboptimal referrer and backlink disambiguation using a secondary numbering system.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"description3-identical" => __("Repeating the content is an opportunity to add details.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
)
|
||||
);
|
||||
// display template with replaced placeholders
|
||||
echo $l_obj_Template->getContent();
|
||||
}
|
||||
|
||||
public function Scrolling() {
|
||||
|
||||
// load template file
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-scrolling");
|
||||
// replace all placeholders
|
||||
$l_obj_Template->replace(
|
||||
array(
|
||||
|
||||
"label-scroll-offset" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, __("Scroll offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"scroll-offset" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET, 0, 100),
|
||||
|
@ -309,17 +385,31 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*
|
||||
* Edited:
|
||||
* @since 2.2.0 position-sensitive placeholders to support more locales 2020-12-11T0432+0100
|
||||
* @since 2.2.0 more options 2020-12-11T0432+0100
|
||||
*/
|
||||
public function Love() {
|
||||
// options for the positioning of the reference container
|
||||
// options for the acknowledgment display in the footer:
|
||||
$l_arr_Love = array(
|
||||
// I love Footnotes
|
||||
"text-1" => sprintf(__('I %s %s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME),
|
||||
"text-2" => sprintf(__('This site uses the awesome %s Plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME),
|
||||
// logo only
|
||||
// logo only:
|
||||
"text-3" => sprintf('%s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME),
|
||||
"random" => __('random-driven display of either variant', MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"no" => sprintf(__("no display of any “%s %s” mention in the footer", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL)
|
||||
// logo followed by heart symbol:
|
||||
"text-4" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL),
|
||||
// logo preceded by heart symbol:
|
||||
"text-5" => sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME),
|
||||
// "I love Footnotes": placeholder %1$s is the 'footnotes' logogram, placeholder %2$s is a heart symbol.
|
||||
"text-1" => sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL),
|
||||
// "This website uses Footnotes."
|
||||
"text-6" => sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME),
|
||||
// "This website uses the Footnotes plugin."
|
||||
"text-7" => sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME),
|
||||
// "This website uses the awesome Footnotes plugin."
|
||||
"text-2" => sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME),
|
||||
"random" => __('randomly determined display of either mention', MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
// "No display of any “Footnotes love” mention in the footer"
|
||||
"no" => sprintf(__('no display of any “%1$s %2$s” mention in the footer', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL)
|
||||
);
|
||||
|
||||
// load template file
|
||||
|
@ -330,7 +420,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
"label-love" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, sprintf(__("Tell the world you’re using %s:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)),
|
||||
"love" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_LOVE, $l_arr_Love),
|
||||
|
||||
"label-no-love" => $this->addText(sprintf(__("Don’t tell the world you’re using %s on specific pages by adding the following short code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)),
|
||||
"label-no-love" => $this->addText(sprintf(__("Shortcode to inhibit the display of the %s mention on specific pages:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME)),
|
||||
"no-love" => $this->addText(MCI_Footnotes_Config::C_STR_NO_LOVE_SLUG)
|
||||
)
|
||||
);
|
||||
|
@ -339,12 +429,16 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
}
|
||||
|
||||
/**
|
||||
* Displays all settings that are not grouped in special meta boxes.
|
||||
* Displays the excerpt setting
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*
|
||||
* Edited heading 2020-12-12T1453+0100
|
||||
* @since 2.1.1 more settings and notices
|
||||
* @since 2.2.0 dedicated to the excerpt setting and its notices 2020-12-12T1454+0100
|
||||
*/
|
||||
public function Other() {
|
||||
public function Excerpts() {
|
||||
// options for Yes/No select box:
|
||||
$l_arr_Enabled = array(
|
||||
"yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
|
@ -352,22 +446,16 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
);
|
||||
|
||||
// load template file
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-other");
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "settings-excerpts");
|
||||
// replace all placeholders
|
||||
$l_obj_Template->replace(
|
||||
array(
|
||||
"label-url-wrap" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, __("Allow URLs to line-wrap anywhere:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"url-wrap" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTE_URL_WRAP_ENABLED, $l_arr_Enabled),
|
||||
"notice-url-wrap" => __("Unicode-conformant browsers don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
|
||||
"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, __("Display footnotes in excerpts:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"excerpt" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, $l_arr_Enabled),
|
||||
"notice1-excerpt" => __("This should be disabled.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"notice2-excerpt" => __("In some themes, the Advanced Excerpt plugin is indispensable to display footnotes in excerpts.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"notice3-excerpt" => __("Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"label-excerpts" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, __("Display footnotes in excerpts:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"excerpts" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_IN_EXCERPT, $l_arr_Enabled),
|
||||
"notice-excerpts" => __("The recommended value is No.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
// In some themes, the Advanced Excerpt plugin is indispensable to display footnotes in excerpts.
|
||||
"description1-excerpts" => sprintf(__("In some themes, the %s plugin is indispensable to display footnotes in excerpts.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '<a href="https://wordpress.org/plugins/advanced-excerpt/" target="_blank">Advanced Excerpt</a>'),
|
||||
"description2-excerpts" => __("Footnotes cannot be disabled in excerpts. A workaround is to avoid footnotes in the first 55 words.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
)
|
||||
);
|
||||
// display template with replaced placeholders
|
||||
|
@ -375,10 +463,14 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
}
|
||||
|
||||
/**
|
||||
* Displays all settings for the footnotes Superscript.
|
||||
* Displays all settings for the footnote referrers
|
||||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*
|
||||
* Edited heading 2020-12-12T1513+0100
|
||||
* @since 2.1.1 option for superscript (optionally baseline referrers)
|
||||
* @since 2.2.0 option for link element moved here 2020-12-12T1514+0100
|
||||
*/
|
||||
public function Superscript() {
|
||||
// options for Yes/No select box:
|
||||
|
@ -391,14 +483,18 @@ 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 for footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"label-superscript" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS, __("Display footnote referrers in superscript:", 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 the footnote referrer:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"label-before" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE, __("At the start of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"before" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE),
|
||||
|
||||
"label-after" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER, __("After the footnote referrer:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"after" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER)
|
||||
"label-after" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER, __("At the end of the footnote referrers:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"after" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER),
|
||||
|
||||
"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),
|
||||
"notice-link" => __("The link element is needed to apply the theme’s link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
)
|
||||
);
|
||||
// display template with replaced placeholders
|
||||
|
@ -410,8 +506,11 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.2
|
||||
*
|
||||
* Edited:
|
||||
* @since 2.2.0 3 parts to address increased settings number
|
||||
*/
|
||||
public function MouseOverBox() {
|
||||
public function MouseOverBoxDisplay() {
|
||||
// options for Yes/No select box:
|
||||
$l_arr_Enabled = array(
|
||||
"yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
|
@ -426,46 +525,26 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
"bottom right" => __("bottom right", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"bottom center" => __("bottom center", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"bottom left" => __("bottom left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"center left" => __("center left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
|
||||
);
|
||||
// options for the font size unit:
|
||||
$l_arr_FontSizeUnits = array(
|
||||
"em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"rem" => __("rem", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"pt" => __("points", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"pc" => __("picas", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"mm" => __("millimeters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"center left" => __("center left", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
);
|
||||
|
||||
// load template file
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-mouse-over-box");
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-display");
|
||||
// replace all placeholders
|
||||
$l_obj_Template->replace(
|
||||
array(
|
||||
|
||||
// tooltip settings:
|
||||
|
||||
"label-enable" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __("Enable the tooltip infobox:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"label-enable" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __("Display tooltips:", 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)),
|
||||
"label-alternative" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE, __("Display alternative tooltips:", 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, __("Truncate the note in the tooltip:", 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 number of characters in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"excerpt-length" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000),
|
||||
|
||||
"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),
|
||||
"notice-alternative" => __("Intended to work around a tooltip outage.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
|
||||
"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),
|
||||
|
||||
"label-offset-x" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __("Horizontal offset:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"label-offset-x" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __("Horizontal offset rightwards:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"offset-x" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -150, 150),
|
||||
"notice-offset-x" => __("pixels; negative value for a leftwards offset", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
|
||||
|
@ -477,8 +556,6 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
"max-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280),
|
||||
"notice-max-width" => __("pixels; 0 to disable this setting", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
|
||||
// display durations:
|
||||
|
||||
"label-fade-in-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, __("Fade-in delay:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"fade-in-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY, 0, 20000),
|
||||
"notice-fade-in-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
|
@ -495,7 +572,62 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
"fade-out-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, 0, 20000),
|
||||
"notice-fade-out-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
|
||||
// tooltip styling:
|
||||
)
|
||||
);
|
||||
// display template with replaced placeholders
|
||||
echo $l_obj_Template->getContent();
|
||||
}
|
||||
|
||||
public function MouseOverBoxTruncation() {
|
||||
// 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, "mouse-over-box-truncation");
|
||||
// replace all placeholders
|
||||
$l_obj_Template->replace(
|
||||
array(
|
||||
|
||||
"label-truncation" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, __("Truncate the note in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"truncation" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_Enabled),
|
||||
|
||||
"label-max-length" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __("Maximum number of characters in the tooltip:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"max-length" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, 3, 10000),
|
||||
|
||||
"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),
|
||||
|
||||
)
|
||||
);
|
||||
// display template with replaced placeholders
|
||||
echo $l_obj_Template->getContent();
|
||||
}
|
||||
|
||||
public function MouseOverBoxAppearance() {
|
||||
// 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)
|
||||
);
|
||||
// options for the font size unit:
|
||||
$l_arr_FontSizeUnits = array(
|
||||
"em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"rem" => __("rem", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"pt" => __("points", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"pc" => __("picas", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"mm" => __("millimeters", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
);
|
||||
|
||||
// load template file
|
||||
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "mouse-over-box-appearance");
|
||||
// replace all placeholders
|
||||
$l_obj_Template->replace(
|
||||
array(
|
||||
|
||||
"label-font-size" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, __("Set font size:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"font-size-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED, $l_arr_Enabled),
|
||||
|
@ -555,9 +687,10 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
* @since 1.5.0
|
||||
*
|
||||
* Edited:
|
||||
* 2.2.0 drop localized notices, list directly in the template 2020-12-09T1113+0100
|
||||
*
|
||||
* 2.1.6 drop localized notices for CSS classes as the number increased to 16
|
||||
* list directly in the template, as CSS is in English anyway
|
||||
* @see templates/dashboard/customize-css.html
|
||||
* 2020-12-09T1113+0100
|
||||
*/
|
||||
public function CustomCSS() {
|
||||
// load template file
|
||||
|
@ -596,30 +729,30 @@ 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.1.4 add priority level settings for the other hooks 2020-11-19T1421+0100
|
||||
* Edited:
|
||||
* @since 2.1.1 priority level setting for the_content 2020-11-16T2152+0100
|
||||
* @since 2.1.4 priority level settings for the other hooks 2020-11-19T1421+0100
|
||||
*
|
||||
* 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
|
||||
*/
|
||||
public function lookupHooks() {
|
||||
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-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" => __("For the_content, this figure must be lower than 99 so that a string added by a plugin running at 99 may not be mistaken as a footnote.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"description-3" => __("This makes also sure that the reference container displays above a feature inserted by a plugin running at 1200.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"description-4" => __("Default 9223372036854775807 is lowest priority, 0 is highest.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"description-5" => __("To restore default priority, set to -1, interpreted as 9223372036854775807, the constant PHP_INT_MAX.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"description-6" => __("The widget_text hook must be disabled, because a footnotes container is inserted at the bottom of each widget, but multiple containers in a page are not disambiguated.", 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" => sprintf(__('For the_content, this figure must be lower than %1$d so that certain strings added by a plugin running at %1$d may not be mistaken as a footnote.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 99),
|
||||
"description-3" => sprintf(__('This makes also sure that the reference container displays above a feature inserted by a plugin running at %d.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 1200),
|
||||
"description-4" => sprintf(__('%d is lowest priority, %d is highest.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), PHP_INT_MAX, 0),
|
||||
"description-5" => sprintf(__('To set priority level to lowest, set it to %d, interpreted as %d, the constant %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), -1, PHP_INT_MAX, 'PHP_INT_MAX'),
|
||||
"description-6" => __('The widget_text hook must be disabled, because a footnotes container is inserted at the bottom of each widget, but multiple containers in a page are not disambiguated.', 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),
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
* @filesource
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0 12.09.14 10:56
|
||||
*
|
||||
* Edited:
|
||||
* @since 2.2.0 2020-12-12T1223+0100
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -52,6 +55,9 @@ class MCI_Footnotes_Hooks {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*
|
||||
* Edit: ClearAll didn’t actually work.
|
||||
* @since 2.2.0 this function is not called any longer when deleting the plugin
|
||||
*/
|
||||
public static function uninstallPlugin() {
|
||||
// WordPress User has to be logged in
|
||||
|
@ -63,7 +69,7 @@ class MCI_Footnotes_Hooks {
|
|||
wp_die(__('You do not have permission to run this script.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME));
|
||||
}
|
||||
// deletes all settings and restore the default values
|
||||
MCI_Footnotes_Settings::instance()->ClearAll();
|
||||
// MCI_Footnotes_Settings::instance()->ClearAll();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
*
|
||||
* Edited for:
|
||||
* 2.0.0 PHP-related bug fix thanks to MatKus (@matkus) 2020-10-26T1609+0100
|
||||
* 2.2.0 conform to WordPress plugin language file name scheme 2020-12-08T1931+0100
|
||||
* 2.1.6 conform to WordPress plugin language file name scheme 2020-12-08T1931+0100
|
||||
*
|
||||
* Last modified: 2020-12-11T1449+0100
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -65,7 +67,7 @@ class MCI_Footnotes_Language {
|
|||
return load_plugin_textdomain(
|
||||
MCI_Footnotes_Config::C_STR_PLUGIN_NAME,
|
||||
false, // This argument only fills the gap left by a deprecated argument (since WP2.7).
|
||||
MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/languages' // The plugin basedir is provided.
|
||||
MCI_Footnotes_Config::C_STR_PLUGIN_NAME . '/languages' // The plugin basedir is provided; trailing slash will be clipped.
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
* 2.1.6 option to disable URL line wrapping 2020-12-09T1606+0100
|
||||
* 2.1.6 set default priority level of the_content to 98 2020-12-10T0447+0100
|
||||
*
|
||||
* Last modified: 2020-12-10T0447+0100
|
||||
* Last modified: 2020-12-12T1224+0100
|
||||
*/
|
||||
|
||||
|
||||
|
@ -675,10 +675,9 @@ class MCI_Footnotes_Settings {
|
|||
self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
|
||||
|
||||
// Priority level of the_content as the only relevant one
|
||||
// must be less than 99 because that is the level of Super Socializer,
|
||||
// and the Pinterest button code contains at least one instance of '(('
|
||||
// and one of '))', i.e. the default footnote start and end short codes,
|
||||
// causing an issue with two fake footnotes messing up the whole website.
|
||||
// must be less than 99 because social icons may yield scripts that
|
||||
// contain the strings '((' and '))', i.e. the default footnote start
|
||||
// and end short codes, causing issues with fake footnotes.
|
||||
self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98,
|
||||
self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX,
|
||||
self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
|
||||
|
@ -833,6 +832,9 @@ class MCI_Footnotes_Settings {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*
|
||||
* Edit: This didn’t actually work.
|
||||
* @since 2.2.0 this function is not called any longer when deleting the plugin
|
||||
*/
|
||||
public function ClearAll() {
|
||||
// iterate through each Settings Container
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
* 2.1.6 option to disable URL line wrapping 2020-12-09T1606+0100
|
||||
* 2.1.6 add catch-all exclusion to fix URL line wrapping 2020-12-09T1921+0100
|
||||
*
|
||||
* Last modified: 2020-12-10T1006+0100
|
||||
* Last modified: 2020-12-11T1437+0100
|
||||
*/
|
||||
|
||||
// If called directly, abort:
|
||||
|
@ -282,6 +282,9 @@ class MCI_Footnotes_Task {
|
|||
*
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
*
|
||||
* Edited:
|
||||
* @since 2.2.0 more options 2020-12-11T0506+0100
|
||||
*/
|
||||
public function wp_footer() {
|
||||
if (MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION) == "footer") {
|
||||
|
@ -294,22 +297,20 @@ class MCI_Footnotes_Task {
|
|||
return;
|
||||
}
|
||||
// set a hyperlink to the word "footnotes" in the Love slug
|
||||
$l_str_LinkedName = sprintf('<a href="http://wordpress.org/plugins/footnotes/" target="_blank" style="text-decoration:none;">%s</a>',MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME);
|
||||
$l_str_LinkedName = sprintf('<a href="https://wordpress.org/plugins/footnotes/" target="_blank" style="text-decoration:none;">%s</a>', MCI_Footnotes_Config::C_STR_PLUGIN_PUBLIC_NAME);
|
||||
// get random love me text
|
||||
if (strtolower($l_str_LoveMeIndex) == "random") {
|
||||
$l_str_LoveMeIndex = "text-" . rand(1,3);
|
||||
$l_str_LoveMeIndex = "text-" . rand(1,7);
|
||||
}
|
||||
switch ($l_str_LoveMeIndex) {
|
||||
case "text-1":
|
||||
$l_str_LoveMeText = sprintf(__('I %s %s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_LinkedName);
|
||||
break;
|
||||
case "text-2":
|
||||
$l_str_LoveMeText = sprintf(__('this site uses the awesome %s Plugin', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName);
|
||||
break;
|
||||
case "text-3":
|
||||
default:
|
||||
$l_str_LoveMeText = sprintf(__('extra smooth %s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName);
|
||||
break;
|
||||
// options named wrt backcompat, simplest is default:
|
||||
case "text-1": $l_str_LoveMeText = sprintf(__('I %2$s %1$s', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break;
|
||||
case "text-2": $l_str_LoveMeText = sprintf(__('This website uses the awesome %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break;
|
||||
case "text-4": $l_str_LoveMeText = sprintf('%s %s', $l_str_LinkedName, MCI_Footnotes_Config::C_STR_LOVE_SYMBOL); break;
|
||||
case "text-5": $l_str_LoveMeText = sprintf('%s %s', MCI_Footnotes_Config::C_STR_LOVE_SYMBOL, $l_str_LinkedName); break;
|
||||
case "text-6": $l_str_LoveMeText = sprintf(__('This website uses %s.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break;
|
||||
case "text-7": $l_str_LoveMeText = sprintf(__('This website uses the %s plugin.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME), $l_str_LinkedName); break;
|
||||
case "text-3": default: $l_str_LoveMeText = sprintf('%s', $l_str_LinkedName); break;
|
||||
}
|
||||
echo sprintf('<div style="text-align:center; color:#acacac;">%s</div>', $l_str_LoveMeText);
|
||||
}
|
||||
|
@ -518,7 +519,7 @@ class MCI_Footnotes_Task {
|
|||
$l_str_FootnoteText = substr($p_str_Content, $l_int_PosStart + strlen($l_str_StartingTag), $l_int_Length - strlen($l_str_StartingTag));
|
||||
|
||||
// fix line wrapping of URLs (hyperlinked or not) based on pattern, not link element,
|
||||
// to prevent them from hanging out of the tooltip in non-Unicode-compliant user agents
|
||||
// to prevent them from hanging out of the tooltip in non-Unicode-compliant user agents.
|
||||
// spare however values of the href and the src arguments!
|
||||
// Even ARIA labels may take an URL as value, so use \w=[\'"] as a catch-all 2020-12-10T1005+0100
|
||||
// see public.css
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
* @filesource
|
||||
* @author Stefan Herndler
|
||||
* @since 1.5.0 14.09.14 14:26
|
||||
*
|
||||
* Edited 2.2.0 2020-12-12T2131+0100
|
||||
*/
|
||||
|
||||
|
||||
|
@ -44,9 +46,11 @@ class MCI_Footnotes_Widget_ReferenceContainer extends MCI_Footnotes_WidgetBase {
|
|||
* @author Stefan Herndler
|
||||
* @since 1.5.0
|
||||
* @return string
|
||||
*
|
||||
* Edit: curly quotes 2.2.0 2020-12-12T2130+0100
|
||||
*/
|
||||
protected function getDescription() {
|
||||
return __('The widget defines the position of the reference container if set to "widget area".', MCI_Footnotes_Config::C_STR_PLUGIN_NAME);
|
||||
return __('The widget defines the position of the reference container if set to “widget area”.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -56,9 +60,11 @@ class MCI_Footnotes_Widget_ReferenceContainer extends MCI_Footnotes_WidgetBase {
|
|||
* @since 1.5.0
|
||||
* @param mixed $instance
|
||||
* @return void
|
||||
*
|
||||
* Edit: curly quotes 2.2.0 2020-12-12T2130+0100
|
||||
*/
|
||||
public function form($instance) {
|
||||
echo __('The widget defines the position of the reference container if set to "widget area".', MCI_Footnotes_Config::C_STR_PLUGIN_NAME);
|
||||
echo __('The widget defines the position of the reference container if set to “widget area”.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -5,9 +5,14 @@
|
|||
* Created-Time: 16:21
|
||||
* Since: 1.0
|
||||
*
|
||||
* Version: 2.2.0d6
|
||||
* Version: 2.2.0d8
|
||||
*
|
||||
* Last modified: 2020-12-10T1320+0100
|
||||
* Classes added to public.css may be added to the
|
||||
* list documenting CSS classes for Custom CSS if
|
||||
* recommended for general use.
|
||||
* List in templates/dashboard/customize-css.html
|
||||
*
|
||||
* Last modified: 2020-12-12T2203+0100
|
||||
*/
|
||||
|
||||
|
||||
|
@ -99,12 +104,11 @@ Classes:
|
|||
|
||||
.footnote_tooltip {
|
||||
display: none;
|
||||
z-index: 2147483647;
|
||||
z-index: 2147483647 !important;
|
||||
cursor: auto;
|
||||
text-align: left;
|
||||
padding: 12px;
|
||||
line-height: 1.2;
|
||||
/*font-size: inherit; moved to settings since 2.1.4 */
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
}
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
* Created-Time: 16:21
|
||||
* Since: 1.0
|
||||
*
|
||||
* Version: 2.2.0d6
|
||||
* Version: 2.2.0d8
|
||||
*
|
||||
* Last modified: 2020-12-10T1320+0100
|
||||
* Last modified: 2020-12-12T2203+0100
|
||||
*/
|
||||
|
||||
|
||||
|
@ -182,22 +182,19 @@ IE doesn’t support nth child, but these are not critical
|
|||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/*
|
||||
Other settings
|
||||
*/
|
||||
#settings_other tr td:nth-child(2) {
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
/*
|
||||
Custom CSS
|
||||
|
||||
Localized notices are dropped to ease translators’ task.
|
||||
16 CSS classes are listed directly in the template
|
||||
templates/dashboard/customize-css.html
|
||||
|
||||
Localized notices are dropped to ease translators’ task.
|
||||
</p> end tags are omitted per HTML5 standard, to improve
|
||||
maintainability and readability of the source list.
|
||||
<https://stackoverflow.com/questions/8460993/p-end-tag-p-is-not-needed-in-html>
|
||||
|
||||
The textarea has monospace font but no tab support.
|
||||
The textarea has monospace font, but no other features
|
||||
helping edit CSS, as tab support and syntactic colors.
|
||||
*/
|
||||
#customize_css tr td:first-child {
|
||||
width: 44% !important;
|
||||
|
@ -227,10 +224,18 @@ The textarea has monospace font but no tab support.
|
|||
/************************************************************
|
||||
Notices
|
||||
|
||||
span previously formatted as em element
|
||||
but emphasis is not the correct semantics,
|
||||
as it is rendered as bold in other scripts
|
||||
so we need an explicit italic style:
|
||||
These spans were previously formatted using the em element.
|
||||
But the intended semantics was not emphasis.
|
||||
In locales using boldface to emphasize, the effect is the
|
||||
exact opposite of the intention.
|
||||
|
||||
So we must use spans with explicit italic font style.
|
||||
Scripts not featuring italic fonts fall back to normal,
|
||||
and that is just fine, as italic is only needed here for
|
||||
scripts that do have italic, and failing to use it would
|
||||
look weird.
|
||||
|
||||
since 2.1.4
|
||||
*/
|
||||
.footnotes_notice {
|
||||
font-style: italic;
|
||||
|
@ -239,12 +244,15 @@ so we need an explicit italic style:
|
|||
/************************************************************
|
||||
Descriptions
|
||||
|
||||
fullwidth div above or below settings tables:
|
||||
padded div above or below a settings table
|
||||
|
||||
Use case: more extensive information not fitting into a brief
|
||||
notice after the end of the settings box.
|
||||
*/
|
||||
.footnotes_description {
|
||||
padding: 0 10%;
|
||||
padding: 0 6%;
|
||||
}
|
||||
.footnotes_description p {
|
||||
font-size: 1.4em;
|
||||
font-size: 1.2em;
|
||||
font-style: italic;
|
||||
}
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
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.2.0d6
|
||||
Version: 2.2.0d8
|
||||
Author URI: http://cheret.de/plugins/footnotes-2/
|
||||
Text Domain: footnotes
|
||||
Domain Path: /languages
|
||||
*/
|
||||
define( 'FOOTNOTES_VERSION', '2.2.0d6' );
|
||||
define( 'FOOTNOTES_VERSION', '2.2.0d8' );
|
||||
/*
|
||||
Copyright 2020 Mark Cheret (email: mark@cheret.de)
|
||||
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
/**
|
||||
* Created by Stefan on 24.05.14.
|
||||
*
|
||||
*
|
||||
* Edit: be careful to maintain version number near EOF 2020-12-11T1225+0100
|
||||
*/
|
||||
|
||||
(function() {
|
||||
|
@ -57,14 +60,16 @@
|
|||
* The current keys are longname, author, authorurl, infourl and version.
|
||||
*
|
||||
* @return {Object} Name/value array containing information about the plugin.
|
||||
*
|
||||
* Edit: needs update the version number manually 2020-12-11T1224+0100
|
||||
*/
|
||||
getInfo : function() {
|
||||
return {
|
||||
longname : 'Inserts the Footnotes short code.',
|
||||
author : 'Mark Cheret',
|
||||
authorurl : 'https://cheret.de',
|
||||
infourl : 'http://wordpress.org/plugins/footnotes/',
|
||||
version : "2.0.0"
|
||||
infourl : 'https://wordpress.org/plugins/footnotes/',
|
||||
version : "2.1.6"
|
||||
};
|
||||
}
|
||||
});
|
||||
|
|
22
readme.txt
22
readme.txt
|
@ -2,7 +2,7 @@
|
|||
Contributors: mark.cheret, lolzim, pewgeuges, dartiss
|
||||
Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, reference, referencing
|
||||
Requires at least: 3.9
|
||||
Tested up to: 5.5
|
||||
Tested up to: 5.6
|
||||
Requires PHP: 5.6
|
||||
Stable Tag: 2.1.6
|
||||
License: GPLv3 or later
|
||||
|
@ -80,21 +80,33 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
|
|||
|
||||
== Changelog ==
|
||||
|
||||
= 2.2.0d6 =
|
||||
= 2.2.0d7 =
|
||||
- Add: Start/end short codes: more predefined options
|
||||
- Add: Numbering styles: lowercase Roman numerals support
|
||||
- Update: Dashboard: Tooltip settings: grouped into 3 thematic containers
|
||||
- Update: Dashboard: Main settings: grouped into 3 specific containers
|
||||
- Update: Dashboard: moved link element option to the Referrers options
|
||||
- Update: Dashboard: moved URL wrap option to the Reference container options
|
||||
- Update: Dashboard: grouped both Custom CSS and priority level settings
|
||||
- Update: Dashboard: renamed tabs
|
||||
- Bugfix: Tooltips: add 'important' property to z-index to fix display overlay issue
|
||||
- Bugfix: Localization: correct arguments for plugin textdomain load function
|
||||
- Update: Priority levels: update the notice in the dashboard Priority tab
|
||||
- Bugfix: Reference container, tooltips: URL wrap: specifically catch the quotation mark
|
||||
- Add: Footnotes mention in the footer: more options
|
||||
|
||||
= 2.1.6 =
|
||||
- Bugfix: Priority levels: set the_content priority level to 98 to prevent plugin conflict
|
||||
- Bugfix: Tooltips: set z-index to maximum 2147483647 to address display issues with overlay content
|
||||
- Bugfix: Reference container, tooltips: fix issues with URL wrap span by catch-all negative lookbehind
|
||||
- Bugfix: Reference container, tooltips: add option to disable URL line wrapping added for browser support
|
||||
- Bugfix: Reference container, tooltips: URL wrap: fix issues with span by catch-all negative lookbehind
|
||||
- Bugfix: Dashboard: URL wrap: add option to properly enable/disable URL wrap
|
||||
- Update: Dashboard: reorder tabs and update tab labels
|
||||
- Bugfix: Dashboard: remove Expert mode enable setting since permanently enabled as 'Priority'
|
||||
- Bugfix: Dashboard: fix punctuation-related localization issue by including colon in labels
|
||||
- Bugfix: Localization: conform to WordPress plugin language file name scheme
|
||||
|
||||
= 2.1.5 =
|
||||
- Bugfix: Reference container, tooltips: exclude image source too from URL line wrapping span
|
||||
- Bugfix: Reference container, tooltips: URL wrap: exclude image source too
|
||||
|
||||
= 2.1.4 =
|
||||
- Add: Dashboard: Main settings: add settings for scroll offset and duration
|
||||
|
|
|
@ -1,84 +0,0 @@
|
|||
<table id="customize_mouse_over_box" class="widefat fixed">
|
||||
<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>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-excerpt-length]]</td>
|
||||
<td>[[excerpt-length]]</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]] <span class="footnotes_notice">[[notice-offset-x]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-offset-y]]</td>
|
||||
<td>[[offset-y]] <span class="footnotes_notice">[[notice-offset-y]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-max-width]]</td>
|
||||
<td>[[max-width]] <span class="footnotes_notice">[[notice-max-width]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-fade-in-delay]]</td>
|
||||
<td>[[fade-in-delay]] <span class="footnotes_notice">[[notice-fade-in-delay]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-fade-in-duration]]</td>
|
||||
<td>[[fade-in-duration]] <span class="footnotes_notice">[[notice-fade-in-duration]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-fade-out-delay]]</td>
|
||||
<td>[[fade-out-delay]] <span class="footnotes_notice">[[notice-fade-out-delay]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-fade-out-duration]]</td>
|
||||
<td>[[fade-out-duration]] <span class="footnotes_notice">[[notice-fade-out-duration]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-font-size]]</td>
|
||||
<td>[[font-size-enable]][[font-size-scalar]][[font-size-unit]] <span class="footnotes_notice">[[notice-font-size]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-color]]</td>
|
||||
<td>[[color]] <span class="footnotes_notice">[[notice-color]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-background]]</td>
|
||||
<td>[[background]] <span class="footnotes_notice">[[notice-background]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-border-width]]</td>
|
||||
<td>[[border-width]] <span class="footnotes_notice">[[notice-border-width]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-border-color]]</td>
|
||||
<td>[[border-color]] <span class="footnotes_notice">[[notice-border-color]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-border-radius]]</td>
|
||||
<td>[[border-radius]] <span class="footnotes_notice">[[notice-border-radius]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-box-shadow-color]]</td>
|
||||
<td>[[box-shadow-color]] <span class="footnotes_notice">[[notice-box-shadow-color]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
|
@ -12,5 +12,9 @@
|
|||
<td>[[label-after]]</td>
|
||||
<td>[[after]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-link]]</td>
|
||||
<td>[[link]] <span class="footnotes_notice">[[notice-link]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
32
templates/dashboard/mouse-over-box-appearance.html
Normal file
32
templates/dashboard/mouse-over-box-appearance.html
Normal file
|
@ -0,0 +1,32 @@
|
|||
<table id="mouse_over_box_appearance" class="widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-font-size]]</td>
|
||||
<td>[[font-size-enable]][[font-size-scalar]][[font-size-unit]] <span class="footnotes_notice">[[notice-font-size]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-color]]</td>
|
||||
<td>[[color]] <span class="footnotes_notice">[[notice-color]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-background]]</td>
|
||||
<td>[[background]] <span class="footnotes_notice">[[notice-background]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-border-width]]</td>
|
||||
<td>[[border-width]] <span class="footnotes_notice">[[notice-border-width]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-border-color]]</td>
|
||||
<td>[[border-color]] <span class="footnotes_notice">[[notice-border-color]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-border-radius]]</td>
|
||||
<td>[[border-radius]] <span class="footnotes_notice">[[notice-border-radius]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-box-shadow-color]]</td>
|
||||
<td>[[box-shadow-color]] <span class="footnotes_notice">[[notice-box-shadow-color]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
44
templates/dashboard/mouse-over-box-display.html
Normal file
44
templates/dashboard/mouse-over-box-display.html
Normal file
|
@ -0,0 +1,44 @@
|
|||
<table id="mouse_over_box_display" class="widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-enable]]</td>
|
||||
<td>[[enable]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-alternative]]</td>
|
||||
<td>[[alternative]] <span class="footnotes_notice">[[notice-alternative]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-position]]</td>
|
||||
<td>[[position]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-offset-x]]</td>
|
||||
<td>[[offset-x]] <span class="footnotes_notice">[[notice-offset-x]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-offset-y]]</td>
|
||||
<td>[[offset-y]] <span class="footnotes_notice">[[notice-offset-y]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-max-width]]</td>
|
||||
<td>[[max-width]] <span class="footnotes_notice">[[notice-max-width]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-fade-in-delay]]</td>
|
||||
<td>[[fade-in-delay]] <span class="footnotes_notice">[[notice-fade-in-delay]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-fade-in-duration]]</td>
|
||||
<td>[[fade-in-duration]] <span class="footnotes_notice">[[notice-fade-in-duration]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-fade-out-delay]]</td>
|
||||
<td>[[fade-out-delay]] <span class="footnotes_notice">[[notice-fade-out-delay]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-fade-out-duration]]</td>
|
||||
<td>[[fade-out-duration]] <span class="footnotes_notice">[[notice-fade-out-duration]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
16
templates/dashboard/mouse-over-box-truncation.html
Normal file
16
templates/dashboard/mouse-over-box-truncation.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<table id="mouse_over_box_truncation" class="widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-truncation]]</td>
|
||||
<td>[[truncation]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-max-length]]</td>
|
||||
<td>[[max-length]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-readon]]</td>
|
||||
<td>[[readon]]</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
11
templates/dashboard/settings-excerpts.html
Normal file
11
templates/dashboard/settings-excerpts.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
<table id="settings_excerpts" class="widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-excerpts]]</td>
|
||||
<td>[[excerpts]] <span class="footnotes_notice">[[notice-excerpts]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="footnotes_description">
|
||||
<p>[[description1-excerpts]] [[description2-excerpts]]</p>
|
||||
</div>
|
15
templates/dashboard/settings-numbering.html
Normal file
15
templates/dashboard/settings-numbering.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<table id="settings_numbering" class="widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-counter-style]]</td>
|
||||
<td>[[counter-style]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-identical]]</td>
|
||||
<td>[[identical]] <span class="footnotes_notice">[[notice-identical]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="footnotes_description">
|
||||
<p>[[description1-identical]] [[description2-identical]] [[description3-identical]]</p>
|
||||
</div>
|
|
@ -1,19 +0,0 @@
|
|||
<table id="settings_other" class="widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-url-wrap]]</td>
|
||||
<td>[[url-wrap]]<span class="footnotes_notice"> [[notice-url-wrap]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-link]]</td>
|
||||
<td>[[link]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-excerpt]]</td>
|
||||
<td>[[excerpt]]<span class="footnotes_notice"> [[notice1-excerpt]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="footnotes_description">
|
||||
<p>[[notice2-excerpt]] [[notice3-excerpt]]</p>
|
||||
</div>
|
|
@ -16,6 +16,10 @@
|
|||
<td>[[label-page-layout]]</td>
|
||||
<td>[[page-layout]] <span class="footnotes_notice">[[notice-page-layout]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-url-wrap]]</td>
|
||||
<td>[[url-wrap]] <span class="footnotes_notice">[[notice-url-wrap]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-startpage]]</td>
|
||||
<td>[[startpage]]</td>
|
||||
|
@ -78,7 +82,9 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td>[[label-line-break]]</td>
|
||||
<td>[[line-break]]</td>
|
||||
<td>[[line-break]]
|
||||
<span class="footnotes_notice">[[notice-line-break]]</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
12
templates/dashboard/settings-scrolling.html
Normal file
12
templates/dashboard/settings-scrolling.html
Normal file
|
@ -0,0 +1,12 @@
|
|||
<table id="settings_scrolling" class="widefat fixed">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>[[label-scroll-offset]]</td>
|
||||
<td>[[scroll-offset]] <span class="footnotes_notice">[[notice-scroll-offset]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-scroll-duration]]</td>
|
||||
<td>[[scroll-duration]] <span class="footnotes_notice">[[notice-scroll-duration]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
|
@ -14,22 +14,6 @@
|
|||
<span>[[short-code-end-user]]</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-counter-style]]</td>
|
||||
<td>[[counter-style]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-identical]]</td>
|
||||
<td>[[identical]]</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-scroll-offset]]</td>
|
||||
<td>[[scroll-offset]] <span class="footnotes_notice">[[notice-scroll-offset]]</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>[[label-scroll-duration]]</td>
|
||||
<td>[[scroll-duration]] <span class="footnotes_notice">[[notice-scroll-duration]]</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<script type="text/javascript">
|
Reference in a new issue