bugfix release 2.1.4 (added features fix issues and are not localized yet)

git-svn-id: https://plugins.svn.wordpress.org/footnotes/tags/2.1.4@2432656 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
pewgeuges 2020-12-06 17:54:59 +00:00
parent 2eaf22a30b
commit 665ddda49b
32 changed files with 1511 additions and 602 deletions

View file

@ -210,4 +210,4 @@ class MCI_Footnotes_Convert {
} }
echo "<br/>"; echo "<br/>";
} }
} }

View file

@ -6,9 +6,15 @@
* @author Stefan Herndler * @author Stefan Herndler
* @since 1.5.0 12.09.14 10:56 * @since 1.5.0 12.09.14 10:56
* *
* 2.1.2 added version # of settings.css for cache busting 2020-11-19T1456+0100 * Edited:
* 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
* *
* ############ Please update line 210 after changes to settings.css ############### * ########## fix punctuation-related localization issue in dashboard labels 2020-12-01T0211+0100
* ########## this fix reverted for now; restore when updating strings and translations, line 400
*
* Last modified: 2020-12-06T1654+0100
*/ */
@ -203,14 +209,8 @@ abstract class MCI_Footnotes_LayoutEngine {
// register stylesheet // register stylesheet
// added version # after changes started to settings.css from 2.1.2 on: // added version # after changes started to settings.css from 2.1.2 on:
wp_register_style( // automated update of version number for cache busting
'mci-footnotes-admin-styles', wp_register_style( 'mci-footnotes-admin-styles', plugins_url('footnotes/css/settings.css'), array(), FOOTNOTES_VERSION );
plugins_url('../../css/settings.css', __FILE__),
'',
'2.1.3'
);
// UPDATE version # when making changes to settings.css, FOR CACHE BUSTING
// add stylesheet to the output // add stylesheet to the output
wp_enqueue_style('mci-footnotes-admin-styles'); wp_enqueue_style('mci-footnotes-admin-styles');
@ -380,12 +380,25 @@ abstract class MCI_Footnotes_LayoutEngine {
* @param string $p_str_SettingName Name of the Settings key to connect the Label with the input/select field. * @param string $p_str_SettingName Name of the Settings key to connect the Label with the input/select field.
* @param string $p_str_Caption Label caption. * @param string $p_str_Caption Label caption.
* @return string * @return string
*
* Edited 2020-12-01T0159+0100
* @since #################### no colon
*/ */
protected function addLabel($p_str_SettingName, $p_str_Caption) { protected function addLabel($p_str_SettingName, $p_str_Caption) {
if (empty($p_str_Caption)) { if (empty($p_str_Caption)) {
return ""; return "";
} }
// remove the colon causing localization issues with French,
// and with languages not using punctuation at all,
// and with languages using other punctuation marks instead of colon,
// e.g. Greek using a raised dot.
// In French, colon is preceded by a space, forcibly non-breaking,
// 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.
return sprintf('<label for="%s">%s:</label>', $p_str_SettingName, $p_str_Caption); return sprintf('<label for="%s">%s:</label>', $p_str_SettingName, $p_str_Caption);
// ^ here deleted colon 2020-12-01T0156+0100
// ########## this fix reverted for now; restore when updating strings and translations
} }
/** /**
@ -488,15 +501,26 @@ abstract class MCI_Footnotes_LayoutEngine {
* @author Stefan Herndler * @author Stefan Herndler
* @since 1.5.0 * @since 1.5.0
* @param string $p_str_SettingName Name of the Settings key to pre load the input field. * @param string $p_str_SettingName Name of the Settings key to pre load the input field.
* @param int $p_in_Min Minimum value. * @param int $p_in_Min Minimum value.
* @param int $p_int_Max Maximum value. * @param int $p_int_Max Maximum value.
* @param bool $p_bool_Deci true if 0.1 steps and floating to string, false if integer (default)
* @return string * @return string
*
* Edited:
* @since 2.1.4 step argument and number_format() to allow decimals 2020-12-03T0631+0100..2020-12-05T2006+0100
*/ */
protected function addNumBox($p_str_SettingName, $p_in_Min, $p_int_Max) { protected function addNumBox($p_str_SettingName, $p_in_Min, $p_int_Max, $p_bool_Deci = false ) {
// collect data for given settings field // collect data for given settings field
$l_arr_Data = $this->LoadSetting($p_str_SettingName); $l_arr_Data = $this->LoadSetting($p_str_SettingName);
return sprintf('<input type="number" name="%s" id="%s" value="%d" min="%d" max="%d"/>',
if ($p_bool_Deci) {
$l_str_Value = number_format($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 {
return sprintf('<input type="number" name="%s" id="%s" value="%d" min="%d" max="%d"/>',
$l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"], $p_in_Min, $p_int_Max); $l_arr_Data["name"], $l_arr_Data["id"], $l_arr_Data["value"], $p_in_Min, $p_int_Max);
}
} }
} // end of class } // end of class

View file

@ -7,12 +7,12 @@
* @since 1.5.0 14.09.14 14:47 * @since 1.5.0 14.09.14 14:47
* *
* Edited for: * Edited for:
* 2.0.4 2020-11-01T0509+0100 * 2.0.4 restore arrow settings 2020-11-01T0509+0100
* 2.1.0 2020-11-08T2148+0100 * 2.1.0 read-on button label 2020-11-08T2148+0100
* 2.1.1 2020-11-16T2152+0100 * 2.1.1 options for ref container and alternative tooltips 2020-11-16T2152+0100
* 2.1.3 2020-11-24T0955+0100 * 2.1.4 settings for ref container, tooltips and scrolling 2020-12-03T0950+0100
* *
* Last modified: 2020-11-24T0955+0100 * Last modified: 2020-12-06T1653+0100
*/ */
/** /**
@ -89,12 +89,13 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
// Change string "%s styling" to "Footnotes styling" to fix layout in WPv5.5: // 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", "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", "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: // Leave intact since this is not localized:
$this->addMetaBox("settings", "love", MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . '&nbsp;' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, "Love"), $this->addMetaBox("settings", "love", MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . '&nbsp;' . 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: // The HyperlinkArrow meta box ceased for 2.0.0
$this->addMetaBox("customize", "hyperlink-arrow", __("Hyperlink symbol in the Reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "HyperlinkArrow"), // 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", __("Superscript layout", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Superscript"), $this->addMetaBox("customize", "superscript", __("Superscript layout", 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", "mouse-over-box", __("Mouse-over box", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBox"),
$this->addMetaBox("customize", "custom-css", __("Add custom CSS to the public page", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSS"), $this->addMetaBox("customize", "custom-css", __("Add custom CSS to the public page", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSS"),
@ -111,6 +112,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
* *
* @author Stefan Herndler * @author Stefan Herndler
* @since 1.5.0 * @since 1.5.0
*
* Completed:
* @since 2.1.4: layout and typography options 2020-11-30T0548+0100
*/ */
public function ReferenceContainer() { public function ReferenceContainer() {
// options for the positioning of the reference container // options for the positioning of the reference container
@ -119,6 +123,36 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"post_end" => __("at the end of the post", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "post_end" => __("at the end of the post", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"widget" => __("in the widget area", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) "widget" => __("in the widget area", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
); );
// basic responsive page layout options:
$l_arr_PageLayoutOptions = array(
"none" => __("Dont fix the layout", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"reference-container" => __("to the reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"page-content" => __("to everything after the post title until the reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"main-content" => __("to everything from the post title to the reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
);
// options for the separating punctuation between backlinks:
// Unicode names are conventionally uppercase.
$l_arr_Separators = array(
"comma" => __("COMMA", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"semicolon" => __("SEMICOLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"en_dash" => __("EN DASH", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
);
// options for the terminating punctuation after backlinks:
// The Unicode name of RIGHT PARENTHESIS was originally more accurate because it is bidi-mirrored.
// The wrong names were enforced in spite of Unicode, that subsequently scrambled to correct.
$l_arr_Terminators = array(
"period" => __("FULL STOP", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"parenthesis" => __("CLOSING PARENTHESIS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"colon" => __("COLON", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
);
// options for the first column width (per cent is a ratio, not a unit):
$l_arr_WidthUnits = array(
"%" => __("per cent", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"px" => __("pixels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"rem" => __("root em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"em" => __("em", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"vw" => __("viewport width", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
);
// options for Yes/No select box: // options for Yes/No select box:
$l_arr_Enabled = array( $l_arr_Enabled = array(
"yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
@ -136,20 +170,55 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"label-collapse" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, __("Collapse references by default", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-collapse" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, __("Collapse references by default", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"collapse" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, $l_arr_Enabled), "collapse" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, $l_arr_Enabled),
"label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __("Display a backlink symbol", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __("Where shall the reference container appear", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"symbol" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_Enabled), "position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_Positions),
"label-page-layout" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, __("Apply basic responsive page layout", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"page-layout" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT, $l_arr_PageLayoutOptions),
"notice-page-layout" => __("Most themes dont 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)), "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), "startpage" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE, $l_arr_Enabled),
"label-3column" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __("Three-column layout", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, __("Display a backlink symbol", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"3column" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_Enabled), "symbol-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE, $l_arr_Enabled),
"symbol-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::getArrow()),
"symbol-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED),
"notice-symbol" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-switch" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __("Symbol appended, not prepended", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-switch" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, __("Symbol appended, not prepended", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"switch" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_Enabled), "switch" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH, $l_arr_Enabled),
"label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __("Where shall the reference container appear", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-3column" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, __("Backlink symbol in an extra column", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_Positions) "3column" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_Enabled),
"notice-3column" => __("This legacy layout is available if identical footnotes are not combined.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-separator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, __("Add a separator when enumerating backlinks", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"separator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED, $l_arr_Enabled),
"separator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION, $l_arr_Separators),
"separator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM),
"notice-separator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-terminator" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, __("Add a terminal punctuation to backlinks", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"terminator-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED, $l_arr_Enabled),
"terminator-options" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION, $l_arr_Terminators),
"terminator-custom" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM),
"notice-terminator" => __("Your input overrides the selection.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, __("Set backlinks column width", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED, $l_arr_Enabled),
"width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR, 0, 500, true),
"width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT, $l_arr_WidthUnits),
"notice-width" => __("Absolute width in pixels doesnt need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, __("Set backlinks column maximum width", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"max-width-enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED, $l_arr_Enabled),
"max-width-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR, 0, 500, true),
"max-width-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT, $l_arr_WidthUnits),
"notice-max-width" => __("Absolute width in pixels doesnt need to be accurate to the tenth, but relative width in rem or em may.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"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),
) )
); );
// display template with replaced placeholders // display template with replaced placeholders
@ -166,7 +235,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
// define some space for the output // define some space for the output
$l_str_Space = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"; $l_str_Space = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
// options for the combination of identical footnotes // options for the combination of identical footnotes
$l_arr_CombineIdentical = array( $l_arr_Enable = array(
"yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "yes" => __("Yes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) "no" => __("No", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
); );
@ -198,28 +267,35 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
// replace all placeholders // replace all placeholders
$l_obj_Template->replace( $l_obj_Template->replace(
array( array(
"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_CombineIdentical),
"label-short-code-start" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __("Footnote tag starts with", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-short-code-start" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, __("Footnote tag starts with", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"short-code-start" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_ShortCodeStart), "short-code-start" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, $l_arr_ShortCodeStart),
"short-code-start-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED),
"label-short-code-end" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, __("and ends with", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-short-code-end" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, __("and ends with", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"short-code-end" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, $l_arr_ShortCodeEnd), "short-code-end" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, $l_arr_ShortCodeEnd),
"label-short-code-start-user" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED, ""),
"short-code-start-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED),
"label-short-code-end-user" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED, ""),
"short-code-end-user" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED), "short-code-end-user" => $this->addTextBox(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)), // for script showing/hiding user defined text boxes:
"counter-style" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE, $l_arr_CounterStyle),
"short-code-start-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START, "short-code-start-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START,
"short-code-end-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END, "short-code-end-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_END,
"short-code-start-user-id" => MCI_Footnotes_Settings::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED, "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, "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)),
"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),
"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),
"notice-scroll-offset" => __("per cent from the upper edge of the window", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-scroll-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, __("Scroll duration", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"scroll-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION, 0, 20000),
"notice-scroll-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
) )
); );
// display template with replaced placeholders // display template with replaced placeholders
@ -276,8 +352,15 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
// replace all placeholders // replace all placeholders
$l_obj_Template->replace( $l_obj_Template->replace(
array( 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)), "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), "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&nbsp;words.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-expert-mode" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_EXPERT_MODE, __("Enable the Expert mode", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-expert-mode" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_EXPERT_MODE, __("Enable the Expert mode", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"expert-mode" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_EXPERT_MODE, $l_arr_Enabled) "expert-mode" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_EXPERT_MODE, $l_arr_Enabled)
) )
@ -340,11 +423,25 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"bottom left" => __("bottom left", 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) "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),
);
// load template file // 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, "customize-mouse-over-box");
// replace all placeholders // replace all placeholders
$l_obj_Template->replace( $l_obj_Template->replace(
array( array(
// tooltip settings:
"label-enable" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __("Enable the mouse-over box", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-enable" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, __("Enable the mouse-over box", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_Enabled), "enable" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED, $l_arr_Enabled),
@ -355,7 +452,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"activate-excerpt" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_Enabled), "activate-excerpt" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED, $l_arr_Enabled),
"label-excerpt-length" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __("Maximum characters for the excerpt", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-excerpt-length" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH, __("Maximum characters for the excerpt", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"excerpt-length" => $this->addTextBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH), "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)), "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), "readon" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL),
@ -364,13 +461,43 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION, $l_arr_Position), "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, __("Offset X (px)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-offset-x" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, __("Offset X (px)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"offset-x" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -50, 50), "offset-x" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X, -150, 150),
"notice-offset-x" => __("Offset (X axis) in px (may be negative)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "notice-offset-x" => __("Offset (X axis) in px (may be negative)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-offset-y" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __("Offset Y (px)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-offset-y" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, __("Offset Y (px)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"offset-y" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -50, 50), "offset-y" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y, -150, 150),
"notice-offset-y" => __("Offset (Y axis) in px (may be negative)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "notice-offset-y" => __("Offset (Y axis) in px (may be negative)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __("Max. width (px)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"max-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280),
"notice-max-width" => __("Set the max-width to 0px 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),
"label-fade-in-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, __("Fade-in duration", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"fade-in-duration" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION, 0, 20000),
"notice-fade-in-duration" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-fade-out-delay" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, __("Fade-out delay", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"fade-out-delay" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY, 0, 20000),
"notice-fade-out-delay" => __("milliseconds", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-fade-out-duration" => $this->addLabel(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION, __("Fade-out duration", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"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:
"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),
"font-size-scalar" => $this->addNumBox(MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR, 0, 50, true),
"font-size-unit" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT, $l_arr_FontSizeUnits),
"notice-font-size" => __("By default, the font size is set to equal the surrounding text.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __("Color", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __("Color", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR), "color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR),
"notice-color" => __("Empty color will use the default color defined by your current theme.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "notice-color" => __("Empty color will use the default color defined by your current theme.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
@ -380,7 +507,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"notice-background" => __("Empty color will use the default background-color defined by your current theme.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "notice-background" => __("Empty color will use the default background-color defined by your current theme.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-border-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __("Border width (px)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-border-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, __("Border width (px)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"border-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4), "border-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true),
"notice-border-width" => __("Set the width to 0px to hide the border.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "notice-border-width" => __("Set the width to 0px to hide the border.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-border-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __("Border color", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-border-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR, __("Border color", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
@ -388,13 +515,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"notice-border-color" => __("Empty color will use the default border-color defined by your current theme.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "notice-border-color" => __("Empty color will use the default border-color defined by your current theme.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-border-radius" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __("Border radius (px)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-border-radius" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __("Border radius (px)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"border-radius" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 20), "border-radius" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500),
"notice-border-radius" => __("Set the radius to 0px to avoid a radius.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "notice-border-radius" => __("Set the radius to 0px to avoid a radius.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-max-width" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, __("Max. width (px)", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"max-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH, 0, 1280),
"notice-max-width" => __("Set the max-width to 0px to disable this setting.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-box-shadow-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __("Box shadow color", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)), "label-box-shadow-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR, __("Box shadow color", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"box-shadow-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR), "box-shadow-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR),
"notice-box-shadow-color" => __("Empty color will use the default box shadow defined by your current theme.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "notice-box-shadow-color" => __("Empty color will use the default box shadow defined by your current theme.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
@ -416,24 +539,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
* The former 'hyperlink arrow', incompatible with combined identical footnotes, * The former 'hyperlink arrow', incompatible with combined identical footnotes,
* became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics * became 'prepended arrow' in v2.0.3 after a user complaint about missing backlinking semantics
* of the footnote number. * of the footnote number.
*
* @since 2.1.4 moved to Settings > Reference container > Display a backlink symbol
*/ */
public function HyperlinkArrow() {
// load template file
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-hyperlink-arrow");
// replace all placeholders
$l_obj_Template->replace(
array(
"label-symbol" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, __("Hyperlink symbol", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"symbol" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW, MCI_Footnotes_Convert::getArrow()),
"label-user-defined" => $this->addLabel(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED, __("or enter a user defined symbol", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"user-defined" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_HYPERLINK_ARROW_USER_DEFINED),
"comment" => __("if set it overrides the hyperlink symbol above", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
)
);
// display template with replaced placeholders
echo $l_obj_Template->getContent();
}
/** /**
* Displays the custom css box. * Displays the custom css box.
@ -477,7 +585,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
* *
* Edited for: * Edited for:
* 2.1.1 add priority level setting for the_content 2020-11-16T2152+0100 * 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 * 2.1.4 add priority level settings for the other hooks 2020-11-19T1421+0100
*/ */
public function lookupHooks() { public function lookupHooks() {
// load template file // load template file
@ -496,10 +604,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"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-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-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-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-4" => __("For the_content, this figure needs to be lower than 1200 to make sure that the reference container displays above features inserted by other plugins running at 1200 or a greater/lower level, later in the process.", 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-5" => __("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-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),
"head-hook" => __("WordPress hook function name", 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-checkbox" => __("Activate", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),

View file

@ -2,21 +2,19 @@
/** /**
* Includes the main Class of the Plugin. * Includes the main Class of the Plugin.
* *
* ******************************************************************************************************
* IMPORTANT: In registerPublic() line 163: Please keep plugin version # up to date for cache busting. *
* Also in class/dashboard/layout:210 for settings.css *
* ******************************************************************************************************
*
* @filesource * @filesource
* @author Stefan Herndler * @author Stefan Herndler
* @since 1.5.0 12.09.14 10:56 * @since 1.5.0 12.09.14 10:56
* *
* Edited for v1.6.5: Replaced deprecated function create_function() * Edited:
* Edited for v2.0.0: Added jQueryUI from Cloudflare 2020-10-26T1907+0100 * 1.6.5 replace deprecated function create_function()
* Edited for v2.0.3: Added style sheet versioning 2020-10-29T1413+0100 * 2.0.0 add jQueryUI from Cloudflare 2020-10-26T1907+0100
* Edited for v2.0.4: Added jQuery UI from WordPress 2020-11-01T1902+0100 * 2.0.3 add versioning of public.css for cache busting 2020-10-29T1413+0100
* 2.0.4 add jQuery UI from WordPress 2020-11-01T1902+0100
* 2.1.4 automate passing version number for cache busting 2020-11-30T0646+0100
* 2.1.4 optionally enqueue an extra style sheet 2020-12-04T2231+0100
* *
* Continual update of version number for cache busting. * Last modified: 2020-12-06T1655+0100
*/ */
@ -135,8 +133,10 @@ class MCI_Footnotes {
wp_enqueue_script( 'jquery-ui-position' ); wp_enqueue_script( 'jquery-ui-position' );
wp_enqueue_script( 'jquery-ui-tooltip' ); wp_enqueue_script( 'jquery-ui-tooltip' );
// enqueue jQuery Tools: redacted jQuery.browser, completed minification; added versioning 2020-11-18T2150+0100 // enqueue jQuery Tools:
wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), '', '2.1.1'); // redacted jQuery.browser, completed minification; added versioning 2020-11-18T2150+0100
// not use '-js' in the handle, is appended automatically
wp_enqueue_script('mci-footnotes-jquery-tools', plugins_url('footnotes/js/jquery.tools.min.js'), array(), '1.2.7redacted');
// Alternatively, fetch jQuery UI from cdnjs.cloudflare.com: // Alternatively, fetch jQuery UI from cdnjs.cloudflare.com:
@ -155,13 +155,16 @@ class MCI_Footnotes {
//### STYLES //### STYLES
// IMPORTANT: up-to-date plugin version number NEEDED FOR CACHE BUSTING: // up-to-date plugin version number needed for cache busting:
wp_enqueue_style( // not use '-css' in the handle, is appended automatically;
'mci-footnotes-css-public', // constant FOOTNOTES_VERSION defined in footnotes.php, media all is default
plugins_url('../css/public.css', __FILE__), wp_enqueue_style( 'mci-footnotes-public', plugins_url('footnotes/css/public.css'), array(), FOOTNOTES_VERSION, 'all' );
'',
'2.1.3'
);
}
// optional layout fix by lack of layout support:
// since 2.1.4 2020-12-05T1417+0100
$l_str_LayoutOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT);
if ($l_str_LayoutOption != 'none') {
wp_enqueue_style( 'mci-footnotes-layout-' . $l_str_LayoutOption, plugins_url('footnotes/css/layout-' . $l_str_LayoutOption . '.css'), array(), FOOTNOTES_VERSION, 'all' );
}
}
} }

View file

@ -7,18 +7,19 @@
* @since 1.5.0 14.09.14 10:43 * @since 1.5.0 14.09.14 10:43
* *
* Edited for: * Edited for:
* 2.0.4 restore arrow settings 2020-11-02T2115+0100 * 2.0.4 restore arrow settings 2020-11-02T2115+0100
* 2.0.7 remove hook the_post 2020-11-06T1342+0100 * 2.0.7 remove hook the_post 2020-11-06T1342+0100
* 2.1.0 add read-on button label customization 2020-11-08T2149+0100 * 2.1.0 add read-on button label customization 2020-11-08T2149+0100
* 2.1.1 fix tooltips on site by alternative 2020-11-11T1819+0100 * 2.1.1 fix tooltips on site by alternative 2020-11-11T1819+0100
* 2.1.1 fix disabling backlink symbol 2020-11-16T2021+0100 * 2.1.1 fix disabling backlink symbol 2020-11-16T2021+0100
* 2.1.1 fix superscript by making it optional * 2.1.1 fix superscript by making it optional
* 2.1.1 fix start pages by option to hide ref container * 2.1.1 fix start pages by option to hide ref container
* 2.1.1 fix ref container by option restoring 3-column layout * 2.1.1 fix ref container by option restoring 3-column layout
* 2.1.1 fix ref container by option to switch index/symbol 2020-11-16T2022+0100 * 2.1.1 fix ref container by option to switch index/symbol 2020-11-16T2022+0100
* 2.1.3 fix ref container positioning by priority level 2020-11-17T0205+0100 * 2.1.3 fix ref container positioning by priority level 2020-11-17T0205+0100
* 2.1.4 more settings container keys 2020-12-03T0955+0100
* *
* Last modified: 2020-11-17T0311+0100 * Last modified: 2020-12-06T1653+0100
*/ */
@ -175,7 +176,7 @@ class MCI_Footnotes_Settings {
/** /**
* Settings Container Key for alternative tooltip implementation * Settings Container Key for alternative tooltip implementation
* *
* @since 2.2.0 * @since 2.1.4
* @var string * @var string
* *
* 2020-11-11T1817+0100 * 2020-11-11T1817+0100
@ -373,7 +374,7 @@ class MCI_Footnotes_Settings {
const C_STR_FOOTNOTES_TOOLTIP_READON_LABEL = "footnote_inputfield_readon_label"; 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 * @since 2.1.1
* @var string * @var string
@ -381,18 +382,83 @@ class MCI_Footnotes_Settings {
* 2020-11-16T0859+0100 * 2020-11-16T0859+0100
*/ */
const C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS = "footnotes_inputfield_referrer_superscript_tags"; 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_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_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_3COLUMN_LAYOUT_ENABLE = "footnotes_inputfield_reference_container_3column_layout_enable";
const C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH = "footnotes_inputfield_reference_container_backlink_symbol_switch"; const C_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_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_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_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_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"; 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
* Settings Container Keys for backlink typography and layout
* Settings Container Keys for tooltip font size
* Settings Container Keys for page layout support
* Settings Container Keys for scroll offset and duration
* Settings Container Keys for tooltip display durations
*
* @since 2.1.4
* @var string|bool|int
*
* 2020-11-26T1002+0100
* 2020-11-30T0427+0100
* 2020-12-03T0501+0100
* 2020-12-05T0425+0100
*/
// link element option:
const C_BOOL_LINK_ELEMENT_ENABLED = "footnote_inputfield_link_element_enabled";
// backlink typography:
const C_BOOL_BACKLINKS_SEPARATOR_ENABLED = "footnotes_inputfield_backlinks_separator_enabled";
const C_STR_BACKLINKS_SEPARATOR_OPTION = "footnotes_inputfield_backlinks_separator_option";
const C_STR_BACKLINKS_SEPARATOR_CUSTOM = "footnotes_inputfield_backlinks_separator_custom";
const C_BOOL_BACKLINKS_TERMINATOR_ENABLED = "footnotes_inputfield_backlinks_terminator_enabled";
const C_STR_BACKLINKS_TERMINATOR_OPTION = "footnotes_inputfield_backlinks_terminator_option";
const C_STR_BACKLINKS_TERMINATOR_CUSTOM = "footnotes_inputfield_backlinks_terminator_custom";
// backlink layout:
const C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED = "footnotes_inputfield_backlinks_column_width_enabled";
const C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR = "footnotes_inputfield_backlinks_column_width_scalar";
const C_STR_BACKLINKS_COLUMN_WIDTH_UNIT = "footnotes_inputfield_backlinks_column_width_unit";
const C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED = "footnotes_inputfield_backlinks_column_max_width_enabled";
const C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR = "footnotes_inputfield_backlinks_column_max_width_scalar";
const C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT = "footnotes_inputfield_backlinks_column_max_width_unit";
const C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED = "footnotes_inputfield_backlinks_line_breaks_enabled";
// tooltip font size:
// called mouse over box not tooltip for consistency
const C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED = "footnotes_inputfield_mouse_over_box_font_size_enabled";
const C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR = "footnotes_inputfield_mouse_over_box_font_size_scalar";
const C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT = "footnotes_inputfield_mouse_over_box_font_size_unit";
// page layout support:
const C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT = "footnotes_inputfield_page_layout_support";
// scroll offset and duration:
const C_INT_FOOTNOTES_SCROLL_OFFSET = "footnotes_inputfield_scroll_offset";
const C_INT_FOOTNOTES_SCROLL_DURATION = "footnotes_inputfield_scroll_duration";
// tooltip display durations:
// called mouse over box not tooltip for consistency
const C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY = "footnotes_inputfield_mouse_over_box_fade_in_delay";
const C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION = "footnotes_inputfield_mouse_over_box_fade_in_duration";
const C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY = "footnotes_inputfield_mouse_over_box_fade_out_delay";
const C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION = "footnotes_inputfield_mouse_over_box_fade_out_duration";
/** /**
@ -424,28 +490,61 @@ class MCI_Footnotes_Settings {
"footnotes_storage" => array( "footnotes_storage" => array(
self::C_STR_FOOTNOTES_SHORT_CODE_START => '((',
self::C_STR_FOOTNOTES_SHORT_CODE_END => '))',
self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '',
self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '',
self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain',
self::C_INT_FOOTNOTES_SCROLL_OFFSET => 20,
self::C_INT_FOOTNOTES_SCROLL_DURATION => 380,
self::C_STR_REFERENCE_CONTAINER_NAME => 'References', self::C_STR_REFERENCE_CONTAINER_NAME => 'References',
self::C_BOOL_REFERENCE_CONTAINER_COLLAPSE => 'no', self::C_BOOL_REFERENCE_CONTAINER_COLLAPSE => 'no',
self::C_STR_REFERENCE_CONTAINER_POSITION => 'post_end', self::C_STR_REFERENCE_CONTAINER_POSITION => 'post_end',
self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => 'yes', self::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES => 'yes',
// whether to enqueue additional style sheet:
self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none',
self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes', self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes',
self::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes', self::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes',
self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no', self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no',
self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no', self::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no',
self::C_STR_FOOTNOTES_SHORT_CODE_START => '((', // backlink separators and terminators are often not preferred.
self::C_STR_FOOTNOTES_SHORT_CODE_END => '))', // but a choice must be provided along with the ability to customize:
self::C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED => '', self::C_BOOL_BACKLINKS_SEPARATOR_ENABLED => 'yes',
self::C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED => '', self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma',
self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain', self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '',
self::C_STR_FOOTNOTES_LOVE => 'no', self::C_BOOL_BACKLINKS_TERMINATOR_ENABLED => 'no',
self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop',
self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '',
// set backlinks column width:
self::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no',
self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50',
self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px',
// set backlinks column max width:
self::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no',
self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140',
self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px',
// whether a <br /> tag is inserted:
self::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED => 'no',
// whether to use link elements:
self::C_BOOL_LINK_ELEMENT_ENABLED => 'yes',
// excerpt should be disabled:
self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'no', self::C_BOOL_FOOTNOTES_IN_EXCERPT => 'no',
// since removal of the_post hook, expert mode is no danger zone // since removal of the_post hook, expert mode is no danger zone
// not for experts only; raising awareness about relative positioning // not for experts only; raising awareness about relative positioning
// changed default to 'yes': // changed default to 'yes':
self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes' self::C_BOOL_FOOTNOTES_EXPERT_MODE => 'yes',
self::C_STR_FOOTNOTES_LOVE => 'no',
), ),
@ -487,6 +586,20 @@ class MCI_Footnotes_Settings {
// the current line of text (web coordinates origin is top left): // the current line of text (web coordinates origin is top left):
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7, self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7,
// tooltip display durations:
// called mouse over box not tooltip for consistency
self::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY => 0,
self::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION => 200,
self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY => 400,
self::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION => 200,
// tooltip font size reset to legacy by default since 2.1.4;
// was set to inherit since 2.1.1 as it overrode custom CSS,
// is moved to settings since 2.1.4 2020-12-04T1023+0100
self::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED => 'yes',
self::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR => 13,
self::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT => 'px',
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '', self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '',
// The mouse over box shouldnt feature a colored background // The mouse over box shouldnt feature a colored background
// by default, due to diverging user preferences. White is neutral: // by default, due to diverging user preferences. White is neutral:
@ -510,6 +623,8 @@ class MCI_Footnotes_Settings {
"footnotes_storage_expert" => array( "footnotes_storage_expert" => array(
// checkboxes
// Titles should all be enabled by default to prevent users from // Titles should all be enabled by default to prevent users from
// thinking at first that the feature is broken in post titles. // thinking at first that the feature is broken in post titles.
// See <https://wordpress.org/support/topic/more-feature-ideas/> // See <https://wordpress.org/support/topic/more-feature-ideas/>
@ -517,7 +632,7 @@ class MCI_Footnotes_Settings {
self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '', self::C_BOOL_EXPERT_LOOKUP_THE_TITLE => '',
// This is the only useful one: // This is the only useful one:
self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'yes', self::C_BOOL_EXPERT_LOOKUP_THE_CONTENT => 'checked',
// And the_excerpt is disabled by default following @nikelaos in // And the_excerpt is disabled by default following @nikelaos in
// <https://wordpress.org/support/topic/jquery-comes-up-in-feed-content/#post-13110879> // <https://wordpress.org/support/topic/jquery-comes-up-in-feed-content/#post-13110879>
@ -526,16 +641,18 @@ class MCI_Footnotes_Settings {
self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '', self::C_BOOL_EXPERT_LOOKUP_WIDGET_TITLE => '',
// disabled by default because of issues with footnotes in Elementor accordions: // 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.
// E.g. enabling this causes issues with footnotes in Elementor accordions.
self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => '', self::C_BOOL_EXPERT_LOOKUP_WIDGET_TEXT => '',
// initially hard-coded default // initially hard-coded default
// shows "9223372036854775807" in the numbox // shows "9223372036854780000" instead of 9223372036854775807 in the numbox
// empty should be interpreted as PHP_INT_MAX, // empty should be interpreted as PHP_INT_MAX, but a numbox cannot be set to empty:
// but a numbox cannot be set to empty: <https://github.com/Modernizr/Modernizr/issues/171> // <https://github.com/Modernizr/Modernizr/issues/171>
// define -1 as PHP_INT_MAX instead // define -1 as PHP_INT_MAX instead
self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 10, self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 1000,
self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX, self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX,
self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX, self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => PHP_INT_MAX, self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => PHP_INT_MAX,

View file

@ -8,17 +8,25 @@
* *
* Edited for v2.0.0 and following. * Edited for v2.0.0 and following.
* *
* 2.0.5: Autoload / infinite scroll support added thanks to code from * 2.0.5 Autoload / infinite scroll support added thanks to code from
* @docteurfitness <https://wordpress.org/support/topic/auto-load-post-compatibility-update/> * @docteurfitness <https://wordpress.org/support/topic/auto-load-post-compatibility-update/>
* *
* 2.0.9: DISABLED the_post HOOK 2020-11-08T1839+0100 * 2.0.9 DISABLED the_post HOOK 2020-11-08T1839+0100
* 2.1.0: promoted the 'Continue reading' button from localization to customization 2020-11-08T2146+0100 * 2.1.0 promoted the 'Continue reading' button from localization to customization 2020-11-08T2146+0100
* 2.1.1: combining identical footnotes: fixed dead links 2020-11-14T2233+0100 * 2.1.1 combining identical footnotes: fixed dead links 2020-11-14T2233+0100
* 2.1.1: options fixing ref container layout and referrer vertical alignment 2020-11-16T2024+0100 * 2.1.1 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 * 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.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
* 2.1.4 support appending arrow when combining identicals is on 2020-11-26T1633+0100
* 2.1.4 disable or select backlink separator and terminator 2020-11-28T1048+0100
* 2.1.4 optional line breaks to stack enumerated backlinks 2020-11-28T1049+0100
* 2.1.4 ref container column width and tooltip font size settings 2020-12-03T0954+0100
* 2.1.4 scroll offset and duration settings 2020-12-05T0538+0100
* 2.1.4 tooltip display duration settings 2020-12-06T1320+0100
* *
* Last modified: 2020-11-24T0957+0100 * Last modified: 2020-12-06T1652+0100
*/ */
// If called directly, abort: // If called directly, abort:
@ -142,22 +150,86 @@ class MCI_Footnotes_Task {
* @since 1.5.0 * @since 1.5.0
*/ */
public function wp_head() { public function wp_head() {
// tooltip:
$l_str_FontSizeEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_MOUSE_OVER_BOX_FONT_SIZE_ENABLED));
$l_str_FontSizeScalar = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR);
$l_str_FontSizeUnit = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT);
$l_str_Color = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR); $l_str_Color = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR);
$l_str_Background = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND); $l_str_Background = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND);
$l_int_BorderWidth = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH); $l_int_BorderWidth = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH);
$l_str_BorderColor = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR); $l_str_BorderColor = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR);
$l_int_BorderRadius = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS); $l_int_BorderRadius = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS);
$l_int_MaxWidth = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH); $l_int_MaxWidth = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH);
$l_str_BoxShadowColor = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR); $l_str_BoxShadowColor = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR);
// ref container first column width:
$l_bool_ColumnWidthEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_WIDTH_ENABLED));
$l_int_ColumnWidthScalar = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR);
$l_str_ColumnWidthUnit = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT);
$l_bool_ColumnMaxWidthEnabled = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED));
$l_int_ColumnMaxWidthScalar = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR);
$l_str_ColumnMaxWidthUnit = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT);
if (!empty($l_int_ColumnWidthScalar)) {
if ($l_str_ColumnWidthUnit == '%') {
if ($l_int_ColumnWidthScalar > 100) {
$l_int_ColumnWidthScalar = 100;
}
}
} else {
$l_int_ColumnWidthScalar = 0;
}
if (!empty($l_int_ColumnMaxWidthScalar)) {
if ($l_str_ColumnMaxWidthUnit == '%') {
if ($l_int_ColumnMaxWidthScalar > 100) {
$l_int_ColumnMaxWidthScalar = 100;
}
}
} else {
$l_int_ColumnMaxWidthScalar = 0;
}
?> ?>
<style type="text/css" media="screen"> <style type="text/css" media="all">
<?php <?php
// display ref container on home page:
if (!MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE))) { if (!MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE))) {
echo "\r\n.home .footnotes_reference_container { display: none; }\r\n"; echo ".home .footnotes_reference_container { display: none; }\r\n";
} }
// ref container first column width:
if ( $l_bool_ColumnWidthEnabled || $l_bool_ColumnMaxWidthEnabled ) {
echo ".footnote-reference-container { table-layout: fixed; }";
echo ".footnote_plugin_index, .footnote_plugin_index_combi {";
if ( $l_bool_ColumnWidthEnabled ) {
echo " width: $l_int_ColumnWidthScalar$l_str_ColumnWidthUnit !important;";
}
if ( $l_bool_ColumnMaxWidthEnabled ) {
echo " max-width: $l_int_ColumnMaxWidthScalar$l_str_ColumnMaxWidthUnit !important;";
}
echo '}';
}
// tooltip:
echo '.footnote_tooltip {'; echo '.footnote_tooltip {';
echo ' font-size: ';
if($l_str_FontSizeEnabled) {
echo $l_str_FontSizeScalar . $l_str_FontSizeUnit;
} else {
echo 'inherit';
}
echo ' !important;';
if (!empty($l_str_Color)) { if (!empty($l_str_Color)) {
printf(" color: %s !important;", $l_str_Color); printf(" color: %s !important;", $l_str_Color);
} }
@ -443,6 +515,12 @@ class MCI_Footnotes_Task {
// get footnote text // get footnote text
$l_str_FootnoteText = substr($p_str_Content, $l_int_PosStart + strlen($l_str_StartingTag), $l_int_Length - strlen($l_str_StartingTag)); $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
// spare however values of the href argument!
// see public.css
$l_str_FootnoteText = preg_replace( '#(?<!href=.)(https?://[^\\s<]+)#', '<span class="footnote_url_wrap">$1</span>', $l_str_FootnoteText );
// Text to be displayed instead of the footnote // Text to be displayed instead of the footnote
$l_str_FootnoteReplaceText = ""; $l_str_FootnoteReplaceText = "";
@ -472,44 +550,59 @@ class MCI_Footnotes_Task {
// define the HTML element to use for the referrers: // define the HTML element to use for the referrers:
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS))) { if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS))) {
$l_str_Element = 'sup'; $l_str_SupSpan = 'sup';
} else { } else {
$l_str_Element = 'span'; $l_str_SupSpan = 'span';
} }
// 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': // fill in 'templates/public/footnote.html':
$l_obj_Template->replace( $l_obj_Template->replace(
array( array(
"post_id" => $l_int_PostId, "post_id" => $l_int_PostId,
"id" => $l_int_Index, "id" => $l_int_Index,
"element" => $l_str_Element, "link-start" => $l_str_LinkSpan == 'a' ? '<a>' : '',
"before" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE), "link-end" => $l_str_LinkSpan == 'a' ? '</a>' : '',
"index" => $l_int_Index, "sup-span" => $l_str_SupSpan,
"after" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER), "before" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_BEFORE),
"text" => MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)) ? $l_str_ExcerptText : "", "index" => $l_int_Index,
"after" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER),
"text" => MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)) ? $l_str_ExcerptText : "",
) )
); );
$l_str_FootnoteReplaceText = $l_obj_Template->getContent(); $l_str_FootnoteReplaceText = $l_obj_Template->getContent();
// reset the template // reset the template
$l_obj_Template->reload(); $l_obj_Template->reload();
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED))) { if (
MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ENABLED)) &&
!MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE))
) {
$l_int_OffsetY = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y)); $l_int_OffsetY = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y));
$l_int_OffsetX = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X)); $l_int_OffsetX = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X));
$l_int_FadeInDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY ));
$l_int_FadeInDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION ));
$l_int_FadeOutDelay = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY ));
$l_int_FadeOutDuration = intval(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION));
// fill in 'templates/public/tooltip.html': // fill in 'templates/public/tooltip.html':
$l_obj_TemplateTooltip->replace( $l_obj_TemplateTooltip->replace(
array( array(
"post_id" => $l_int_PostId, "post_id" => $l_int_PostId,
"id" => $l_int_Index, "id" => $l_int_Index,
"position" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION), "position" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION),
"offset-y" => !empty($l_int_OffsetY) ? $l_int_OffsetY : 0, "offset-y" => !empty($l_int_OffsetY) ? $l_int_OffsetY : 0,
"offset-x" => !empty($l_int_OffsetX) ? $l_int_OffsetX : 0, "offset-x" => !empty($l_int_OffsetX) ? $l_int_OffsetX : 0,
"fade-in-delay" => !empty($l_int_FadeInDelay ) ? $l_int_FadeInDelay : 0,
"fade-in-duration" => !empty($l_int_FadeInDuration ) ? $l_int_FadeInDuration : 0,
"fade-out-delay" => !empty($l_int_FadeOutDelay ) ? $l_int_FadeOutDelay : 0,
"fade-out-duration" => !empty($l_int_FadeOutDuration) ? $l_int_FadeOutDuration : 0,
) )
); );
if (!MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE))) { $l_str_FootnoteReplaceText .= $l_obj_TemplateTooltip->getContent();
$l_str_FootnoteReplaceText .= $l_obj_TemplateTooltip->getContent();
}
$l_obj_TemplateTooltip->reload(); $l_obj_TemplateTooltip->reload();
} }
} }
@ -544,18 +637,58 @@ class MCI_Footnotes_Task {
*/ */
public function ReferenceContainer() { public function ReferenceContainer() {
// post ID to make everything unique wrt infinite scroll and archive view: // no footnotes have been replaced on this page:
global $l_int_PostId;
$l_int_PostId = get_the_id();
// no footnotes has been replaced on this page
if (empty(self::$a_arr_Footnotes)) { if (empty(self::$a_arr_Footnotes)) {
return ""; return "";
} }
/**
* INFINITE SCROLL / AUTOLOAD, ARCHIVE VIEW
*
* Multiple posts are appended to each other, functions and IDs must be disambiguated.
* Contributed by @docteurfitness <https://wordpress.org/support/topic/auto-load-post-compatibility-update/>
* @since 2.0.5
*
* post ID to make everything unique wrt infinite scroll and archive view:
*/
global $l_int_PostId;
$l_int_PostId = get_the_id();
// FOOTNOTE INDEX BACKLINK SYMBOL
/**
* OPTIONAL LINK ELEMENT FOR FOOTNOTE REFERRERS AND BACKLINKS
*
* STYLING:
* Link color is preferred for referrers and backlinks.
* Setting a global link color is a common feature in WordPress themes.
* CSS does not support identifiers for link colors (color: link | hover | active | visited)
* These are only supported as pseudo-classes of the link element.
* Hence the link element must be present for styling purposes.
* But styling these elements with the link color is not universally preferred.
* If not, the very presence of the link elements may need to be avoided.
*
* FUNCTIONALITY:
* Although widely used for that purpose, hyperlinks are disliked for footnote linking.
* Browsers may need to be prevented from logging these clicks in the browsing history,
* as logging compromises the usability of the 'return to previous' button in browsers.
* For that purpose, and for scroll animation, this linking is performed by JavaScript.
*
* The link elements have been added and are present @since 2.0.0.
* Then the link addresses were removed @since 2.0.4.
* Then the presence of <a> elements was made optional
* @since 2.1.4
* 2020-11-25T1306+0100
*/
$l_str_LinkSpan = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED)) ? 'a' : 'span';
/**
* FOOTNOTE INDEX BACKLINK SYMBOL
*
* The backlink symbol has been removed for 2.0.0 along with column 2 of the reference container.
* On user request, an arrow is prepended @since 2.0.3, and the setting is restored @since 2.0.4.
* @since 2.1.1 a select box allows to disable the symbol instead of customizing it to invisible.
*/
// check if arrow is enabled: // 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))) { if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE))) {
@ -577,32 +710,97 @@ class MCI_Footnotes_Task {
} else { } else {
// if it is, set it to empty: // if it is not, set arrow to empty:
$l_str_Arrow = ""; $l_str_Arrow = '';
$l_str_FootnoteArrow = ""; $l_str_FootnoteArrow = '';
} }
// REFERENCE CONTAINER TABLE ROW TEMPLATE LOAD /**
* BACKLINK SEPARATOR
*
* Initially a comma was appended in this algorithm for enumerations.
* The comma in enumerations is not generally preferred.
* @since 2.1.4 the separator is optional, has options, and is customizable:
*/
// check if it is even enabled:
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_SEPARATOR_ENABLED))) {
// if so, check if it is customized:
$l_str_Separator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_CUSTOM);
if (empty($l_str_Separator)) {
// if it is not, check which option is on:
$l_str_SeparatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_SEPARATOR_OPTION);
switch ($l_str_SeparatorOption) {
case 'comma' : $l_str_Separator = ','; break;
case 'semicolon': $l_str_Separator = ';'; break;
case 'en_dash' : $l_str_Separator = '&nbsp;&#x2013;'; break;
}
}
} else {
$l_str_Separator = '';
}
// line breaks for source readability: /**
* BACKLINK TERMINATOR
*
* Initially a dot was appended in the table row template.
* @since 2.0.6 a dot after footnote numbers is discarded as not localizable;
* making it optional was envisaged.
* @since 2.1.4 the terminator is optional, has options, and is customizable:
*/
// check if it is even enabled:
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_TERMINATOR_ENABLED))) {
// if so, check if it is customized:
$l_str_Terminator = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_CUSTOM);
if (empty($l_str_Terminator)) {
// if it is not, check which option is on:
$l_str_TerminatorOption = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_BACKLINKS_TERMINATOR_OPTION);
switch ($l_str_TerminatorOption) {
case 'period' : $l_str_Terminator = '.'; break;
case 'parenthesis': $l_str_Terminator = ')'; break;
case 'colon' : $l_str_Terminator = ':'; break;
}
}
} else {
$l_str_Terminator = '';
}
/**
* LINE BREAKS
*
* The backlinks of combined footnotes are generally preferred in an enumeration.
* But when few footnotes are identical, stacking the items in list form is better.
* Variable number length and proportional character width require explicit line breaks.
* Otherwise, an ordinary space character offering a line break opportunity is inserted.
*/
$l_str_LineBreak = MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_BACKLINKS_LINE_BREAKS_ENABLED)) ? '<br />' : ' ';
/**
* For maintenance and support, table rows in the reference container should be
* separated by an empty line. So we add these line breaks for source readability.
* Before the first table row (breaks between rows are ~200 lines below):
*/
$l_str_Body = "\r\n\r\n"; $l_str_Body = "\r\n\r\n";
// when combine identical is turned on, another template is needed:
// REFERENCE CONTAINER TABLE ROW TEMPLATE LOAD
// when combining identical footnotes is turned on, another template is needed:
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) {
// In the combined template, identifiers only are clickable. // the combining template allows for backlink clusters and supports cell clicking for single notes:
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-combi"); $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-combi");
} else { } else {
// when 3-column layout is turned on (only valid if combining is turned off): // when 3-column layout is turned on (only available if combining is turned off):
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE))) { if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE))) {
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-3column"); $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-3column");
} else { } else {
// when switch symbol and index is turned on (only valid if 3-column is disabled): // when switch symbol and index is turned on, and combining and 3-columns are off:
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH))) { if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH))) {
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-switch"); $l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container-body-switch");
@ -615,6 +813,19 @@ class MCI_Footnotes_Task {
} }
} }
// SET SWITCH FLAG INDEPENDENTLY
if (MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH))) {
$l_bool_SymbolSwitch = true;
} else {
$l_bool_SymbolSwitch = false;
}
// FILL IN THE TEMPLATE // FILL IN THE TEMPLATE
// loop through all footnotes found in the page // loop through all footnotes found in the page
@ -632,7 +843,7 @@ class MCI_Footnotes_Task {
// INDEX COLUMN WITH ONE BACKLINK PER TABLE ROW // INDEX COLUMN WITH ONE BACKLINK PER TABLE ROW
// Standard behavior appropriate for combine identical TURNED OFF // Standard behavior appropriate for combining identicals turned off
// generate content of footnote index cell // generate content of footnote index cell
$l_int_FirstFootnoteIndex = ($l_int_Index + 1); $l_int_FirstFootnoteIndex = ($l_int_Index + 1);
@ -643,16 +854,15 @@ class MCI_Footnotes_Task {
// SUPPORT FOR COMBINE IDENTICAL: COMPOSING ENUMERATED BACKLINKS // SUPPORT FOR COMBINING IDENTICALS: COMPOSE ENUMERATED BACKLINKS
$l_str_FootnoteBacklinks = "";
if ( MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) { if ( MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) {
$l_str_FootnoteId = $l_str_FootnoteIndex; $l_str_FootnoteId = $l_str_FootnoteIndex;
// in case the footnote is unique: // in case the footnote is unique:
$l_str_FootnoteReference = '<a id="footnote_plugin_reference_'; $l_str_FootnoteReference = "<$l_str_LinkSpan";
$l_str_FootnoteReference .= ' id="footnote_plugin_reference_';
$l_str_FootnoteReference .= $l_int_PostId; $l_str_FootnoteReference .= $l_int_PostId;
$l_str_FootnoteReference .= "_$l_str_FootnoteId\""; $l_str_FootnoteReference .= "_$l_str_FootnoteId\"";
$l_str_FootnoteReference .= ' class="footnote_backlink"'; $l_str_FootnoteReference .= ' class="footnote_backlink"';
@ -666,55 +876,69 @@ class MCI_Footnotes_Task {
$l_str_FootnoteBacklinks = $l_str_FootnoteReference; $l_str_FootnoteBacklinks = $l_str_FootnoteReference;
$l_str_FootnoteBacklinks .= $l_str_BacklinkEvent; $l_str_FootnoteBacklinks .= $l_str_BacklinkEvent;
// finish both single note and notes cluster: // continue both single note and notes cluster, depending on switch option status:
$l_str_FootnoteReference .= ">$l_str_FootnoteArrow$l_str_FootnoteId</a>"; if ($l_bool_SymbolSwitch) {
$l_str_FootnoteBacklinks .= ">$l_str_FootnoteArrow$l_str_FootnoteId</a>";
// If that is the only footnote with this text, were done. $l_str_FootnoteReference .= ">$l_str_FootnoteId$l_str_FootnoteArrow";
$l_str_FootnoteBacklinks .= ">$l_str_FootnoteId$l_str_FootnoteArrow";
} } else {
$l_str_FootnoteReference .= ">$l_str_FootnoteArrow$l_str_FootnoteId";
$l_str_FootnoteBacklinks .= ">$l_str_FootnoteArrow$l_str_FootnoteId";
}
// If that is the only footnote with this text, were nearly done.
// CHECK IF COMBINE IDENTICAL IS TURNED ON, and // check if it isn't the last footnote in the array:
// check if it isn't the last footnote in the array: if ($l_int_FirstFootnoteIndex < count(self::$a_arr_Footnotes)) {
if ($l_int_FirstFootnoteIndex < count(self::$a_arr_Footnotes) && MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_COMBINE_IDENTICAL_FOOTNOTES))) {
// get all footnotes that haven't passed yet: // get all footnotes that haven't passed yet:
for ($l_int_CheckIndex = $l_int_FirstFootnoteIndex; $l_int_CheckIndex < count(self::$a_arr_Footnotes); $l_int_CheckIndex++) { for ($l_int_CheckIndex = $l_int_FirstFootnoteIndex; $l_int_CheckIndex < count(self::$a_arr_Footnotes); $l_int_CheckIndex++) {
// check if a further footnote is the same as the actual one: // check if a further footnote is the same as the actual one:
if ($l_str_FootnoteText == self::$a_arr_Footnotes[$l_int_CheckIndex]) { if ($l_str_FootnoteText == self::$a_arr_Footnotes[$l_int_CheckIndex]) {
// if so, set the further footnote as empty so it won't be displayed later: // if so, set the further footnote as empty so it won't be displayed later:
self::$a_arr_Footnotes[$l_int_CheckIndex] = ""; self::$a_arr_Footnotes[$l_int_CheckIndex] = "";
// cancel the event altogether: // cancel the event altogether:
$l_str_BacklinkEvent = ""; $l_str_BacklinkEvent = "";
// HERE GOES THE FRAGMENT IDENTIFIER AND THE BACKLINK TOO: // HERE GOES THE FRAGMENT IDENTIFIER AND THE BACKLINK TOO:
// add the footnote index to the actual index: // add the footnote index to the actual index:
// update the footnote ID: // update the footnote ID:
$l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); $l_str_FootnoteId = MCI_Footnotes_Convert::Index(($l_int_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE));
// resume composing the backlinks enumeration: // resume composing the backlinks enumeration:
$l_str_FootnoteBacklinks .= ', <a id="footnote_plugin_reference_'; $l_str_FootnoteBacklinks .= "$l_str_Separator</$l_str_LinkSpan>";
$l_str_FootnoteBacklinks .= $l_int_PostId; $l_str_FootnoteBacklinks .= "$l_str_LineBreak<$l_str_LinkSpan";
$l_str_FootnoteBacklinks .= "_$l_str_FootnoteId"; $l_str_FootnoteBacklinks .= ' id="footnote_plugin_reference_';
$l_str_FootnoteBacklinks .= '" class="footnote_backlink" '; $l_str_FootnoteBacklinks .= $l_int_PostId;
$l_str_FootnoteBacklinks .= 'onclick="footnote_moveToAnchor_' . $l_int_PostId; $l_str_FootnoteBacklinks .= "_$l_str_FootnoteId";
$l_str_FootnoteBacklinks .= "('footnote_plugin_tooltip_$l_int_PostId"; $l_str_FootnoteBacklinks .= '" class="footnote_backlink" ';
$l_str_FootnoteBacklinks .= "_$l_str_FootnoteId');\""; $l_str_FootnoteBacklinks .= 'onclick="footnote_moveToAnchor_' . $l_int_PostId;
$l_str_FootnoteBacklinks .= ">$l_str_FootnoteArrow$l_str_FootnoteId</a>"; $l_str_FootnoteBacklinks .= "('footnote_plugin_tooltip_$l_int_PostId";
$l_str_FootnoteBacklinks .= "_$l_str_FootnoteId');\">";
// this legacy is not used: $l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? '' : $l_str_FootnoteArrow;
//$l_str_FootnoteIndex .= ', ' . MCI_Footnotes_Convert::Index(($l_int_CheckIndex + 1), MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)); $l_str_FootnoteBacklinks .= $l_str_FootnoteId;
$l_str_FootnoteBacklinks .= $l_bool_SymbolSwitch ? $l_str_FootnoteArrow : '';
}
} }
} }
$l_str_FootnoteReference .= "$l_str_Terminator</$l_str_LinkSpan>";
$l_str_FootnoteBacklinks .= "$l_str_Terminator</$l_str_LinkSpan>";
} }
// line wrapping of URLs already fixed, see:
// $l_str_FootnoteText = preg_replace( '#(?<!href=.)(https?://[^\\s<]+)#', '<span class="footnote_url_wrap">$1</span>', $l_str_FootnoteText );
// replace all placeholders in 'templates/public/reference-container-body.html' // replace all placeholders in 'templates/public/reference-container-body.html'
// or in 'templates/public/reference-container-body-combi.html' // or in 'templates/public/reference-container-body-combi.html'
// or in 'templates/public/reference-container-body-3column.html' // or in 'templates/public/reference-container-body-3column.html'
@ -727,6 +951,10 @@ class MCI_Footnotes_Task {
// used in standard layout W/O COMBINED FOOTNOTES: // used in standard layout W/O COMBINED FOOTNOTES:
"post_id" => $l_int_PostId, "post_id" => $l_int_PostId,
"id" => MCI_Footnotes_Convert::Index($l_int_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)), "id" => MCI_Footnotes_Convert::Index($l_int_FirstFootnoteIndex, MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_FOOTNOTES_COUNTER_STYLE)),
"link-start" => $l_str_LinkSpan == 'a' ? '<a>' : '',
"link-end" => $l_str_LinkSpan == 'a' ? '</a>' : '',
"link-span" => $l_str_LinkSpan,
"terminator" => $l_str_Terminator,
// used in standard layout WITH COMBINED IDENTICALS TURNED ON: // used in standard layout WITH COMBINED IDENTICALS TURNED ON:
"pointer" => empty($l_str_BacklinkEvent) ? '' : ' pointer', "pointer" => empty($l_str_BacklinkEvent) ? '' : ' pointer',
@ -741,22 +969,28 @@ class MCI_Footnotes_Task {
$l_str_Body .= $l_obj_Template->getContent(); $l_str_Body .= $l_obj_Template->getContent();
// extra line breaks for page source legibility: // extra line breaks for page source readability:
$l_str_Body .= "\r\n\r\n"; $l_str_Body .= "\r\n\r\n";
$l_obj_Template->reload(); $l_obj_Template->reload();
} }
// get scroll offset and duration settings:
$l_int_ScrollOffset = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_OFFSET);
$l_int_ScrollDuration = MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_INT_FOOTNOTES_SCROLL_DURATION);
// load 'templates/public/reference-container.html': // load 'templates/public/reference-container.html':
$l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container"); $l_obj_TemplateContainer = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_PUBLIC, "reference-container");
$l_obj_TemplateContainer->replace( $l_obj_TemplateContainer->replace(
array( array(
"post_id" => $l_int_PostId, "post_id" => $l_int_PostId,
"label" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME), "label" => MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_NAME),
"button-style" => !MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)) ? 'display: none;' : '', "button-style" => !MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)) ? 'display: none;' : '',
"style" => MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)) ? 'display: none;' : '', "style" => MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE)) ? 'display: none;' : '',
"content" => $l_str_Body, "content" => $l_str_Body,
"scroll-offset" => ($l_int_ScrollOffset / 100),
"scroll-duration" => $l_int_ScrollDuration,
) )
); );

View file

@ -0,0 +1,75 @@
/**
* Basic responsive layout for the main element
*
* Based on Hello Elementor v2.3.0 Basic responsive layout
* themes/hello-elementor/theme.css:8..31
* licensed under GNU General Public License v3 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
*
* Since v2.1.4 of Footnotes
*
* Last modified: 2020-12-06T1722+0100
*
* The enqueuing of this style sheet is optional and can be
* enabled in the Reference container settings.
**/
/***********************************************************
Rationale
In Hello Elementor Theme, this applies to .site-header, and
also to .site-main, which is a class of the <main> element,
at the condition that the page is not built with Elementor:
body:not([class*="elementor-page-"])
Therefore, in pages built with Elementor, proper layout is
applied only to features managed by Elementor, not others.
The Footnotes references container is near the end of main.
This style sheet lets Footnotes reference container come
into the benefit of the basic responsive layout style rules
that would apply if the page were not built with Elementor.
This is mainly useful with Hello Elementor, but it might be
used also with another theme.
*/
main, .main-content, .site-main {
margin-right: auto;
margin-left: auto;
}
@media (max-width: 575px) {
main, .main-content, .site-main {
padding-right: 10px;
padding-left: 10px;
}
}
@media (min-width: 576px) {
main, .main-content, .site-main {
max-width: 500px;
}
}
@media (min-width: 768px) {
main, .main-content, .site-main {
max-width: 600px;
}
}
@media (min-width: 992px) {
main, .main-content, .site-main {
max-width: 800px;
}
}
@media (min-width: 1200px) {
main, .main-content, .site-main {
max-width: 960px;
}
}

View file

@ -0,0 +1,75 @@
/**
* Basic responsive layout for the page content div
*
* Based on Hello Elementor v2.3.0 Basic responsive layout
* themes/hello-elementor/theme.css:8..31
* licensed under GNU General Public License v3 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
*
* Since v2.1.4 of Footnotes
*
* Last modified: 2020-12-06T1722+0100
*
* The enqueuing of this style sheet is optional and can be
* enabled in the Reference container settings.
**/
/***********************************************************
Rationale
In Hello Elementor Theme, this applies to .site-header, and
also to .site-main, which is a class of the <main> element,
at the condition that the page is not built with Elementor:
body:not([class*="elementor-page-"])
Therefore, in pages built with Elementor, proper layout is
applied only to features managed by Elementor, not others.
The Footnotes references container is near the end of main.
This style sheet lets Footnotes reference container come
into the benefit of the basic responsive layout style rules
that would apply if the page were not built with Elementor.
This is mainly useful with Hello Elementor, but it might be
used also with another theme.
*/
div.page-content {
margin-right: auto;
margin-left: auto;
}
@media (max-width: 575px) {
div.page-content {
padding-right: 10px;
padding-left: 10px;
}
}
@media (min-width: 576px) {
div.page-content {
max-width: 500px;
}
}
@media (min-width: 768px) {
div.page-content {
max-width: 600px;
}
}
@media (min-width: 992px) {
div.page-content {
max-width: 800px;
}
}
@media (min-width: 1200px) {
div.page-content {
max-width: 960px;
}
}

View file

@ -0,0 +1,75 @@
/**
* Basic responsive layout for the reference container
*
* Based on Hello Elementor v2.3.0 Basic responsive layout
* themes/hello-elementor/theme.css:8..31
* licensed under GNU General Public License v3 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
*
* Since v2.1.4 of Footnotes
*
* Last modified: 2020-12-06T1722+0100
*
* The enqueuing of this style sheet is optional and can be
* enabled in the Reference container settings.
**/
/***********************************************************
Rationale
In Hello Elementor Theme, this applies to .site-header, and
also to .site-main, which is a class of the <main> element,
at the condition that the page is not built with Elementor:
body:not([class*="elementor-page-"])
Therefore, in pages built with Elementor, proper layout is
applied only to features managed by Elementor, not others.
The Footnotes references container is near the end of main.
This style sheet lets Footnotes reference container come
into the benefit of the basic responsive layout style rules
that would apply if the page were not built with Elementor.
This is mainly useful with Hello Elementor, but it might be
used also with another theme.
*/
.footnotes_reference_container {
margin-right: auto;
margin-left: auto;
}
@media (max-width: 575px) {
.footnotes_reference_container {
padding-right: 10px;
padding-left: 10px;
}
}
@media (min-width: 576px) {
.footnotes_reference_container {
max-width: 500px;
}
}
@media (min-width: 768px) {
.footnotes_reference_container {
max-width: 600px;
}
}
@media (min-width: 992px) {
.footnotes_reference_container {
max-width: 800px;
}
}
@media (min-width: 1200px) {
.footnotes_reference_container {
max-width: 960px;
}
}

View file

@ -4,9 +4,10 @@
* Created-Date: 15.05.14 * Created-Date: 15.05.14
* Created-Time: 16:21 * Created-Time: 16:21
* Since: 1.0 * Since: 1.0
* Version: 2.1.3
* *
* Last modified: 2020-11-24T0958+0100 * Version: 2.1.4
*
* Last modified: 2020-12-06T1649+0100
*/ */
@ -33,6 +34,27 @@ css/settings.css
color: #545f5a; color: #545f5a;
} }
/*****************************************************
Long URLs in Unicode-non-compliant user agents
prevent URLs from expanding the reference container
in mobile view, or from hanging out of the tooltip
based on pattern, not link element
class/task.php
not cross-browser compatible:
word-break: break-word;
overflow-wrap: anywhere;
word-wrap: anywhere;
word-break: break-all;
*/
.footnote_url_wrap {
overflow-wrap: break-word;
word-wrap: break-word;
}
/***************************************************** /*****************************************************
Footnote referrers and tooltips Footnote referrers and tooltips
@ -61,7 +83,7 @@ templates/public/footnote-alternative.html
.footnote_referrer:hover, .footnote_referrer:hover,
.footnote_referrer a:hover, .footnote_referrer a:hover,
.footnote_plugin_tooltip_text:hover { .footnote_plugin_tooltip_text:hover {
text-decoration: underline; text-decoration: none;
font-weight: inherit; font-weight: inherit;
} }
@ -71,14 +93,11 @@ templates/public/footnote-alternative.html
cursor: auto; cursor: auto;
text-align: left; text-align: left;
padding: 12px; padding: 12px;
line-height: 1.2em; line-height: 1.2;
font-size: inherit; /*font-size: inherit; moved to settings since 2.1.4 */
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
.footnote_tooltip a {
word-wrap: anywhere;
}
/* /*
alternative tooltip implementation alternative tooltip implementation
@ -124,6 +143,7 @@ Read-on button
color: green; color: green;
text-decoration: none !important; text-decoration: none !important;
cursor: pointer; cursor: pointer;
white-space: nowrap;
} }
.footnote_tooltip_continue:hover { .footnote_tooltip_continue:hover {
color: blue; color: blue;
@ -135,6 +155,10 @@ Read-on button
Footnote references container Footnote references container
templates/public/reference-container.html templates/public/reference-container.html
Also optional responsive basic page layout support:
public-container.css
public-main.css
*/ */
/* /*
@ -150,7 +174,6 @@ label
margin-bottom: 0.25em !important; margin-bottom: 0.25em !important;
padding: 0 !important; padding: 0 !important;
font-weight: normal !important; font-weight: normal !important;
overflow: hidden !important;
border-bottom: 1px solid #aaaaaa !important; border-bottom: 1px solid #aaaaaa !important;
display: block !important; display: block !important;
-webkit-margin-before: 0.83em !important; -webkit-margin-before: 0.83em !important;
@ -171,7 +194,7 @@ fully clickable, not sign only
*/ */
.footnote_reference_container_collapse_button { .footnote_reference_container_collapse_button {
cursor: pointer; cursor: pointer;
padding-left: .5em; padding: 0 0.5em;
font-size: 1.3em !important; font-size: 1.3em !important;
vertical-align: 2px; vertical-align: 2px;
} }
@ -192,6 +215,7 @@ footnotes
reference-container-body.html reference-container-body.html
*/ */
.footnote_plugin_index, .footnote_plugin_index,
.footnote_plugin_index_combi,
.footnote_plugin_link, .footnote_plugin_link,
.footnote_plugin_text { .footnote_plugin_text {
border:none !important; border:none !important;
@ -210,22 +234,6 @@ reference-container-body.html
text-decoration: none !important; text-decoration: none !important;
border-bottom: none !important; border-bottom: none !important;
} }
/*
These rules when enabled cause the backlink to take an overline
when hovered in some themes, not in others:
.footnote_plugin_index:hover,
.footnote_plugin_index.pointer:hover,
*/
.footnote_backlink:hover,
.footnote_plugin_link:hover,
.footnote_plugin_text a:hover {
text-decoration: unset;
text-decoration: underline !important;
}
.footnote_plugin_index {
max-width: 140px;
width: 2em; /*auto-expanding column to fit widest*/
}
.footnote_backlink, .footnote_backlink,
.footnote_plugin_link { .footnote_plugin_link {
white-space: nowrap; white-space: nowrap;
@ -233,29 +241,55 @@ when hovered in some themes, not in others:
.footnote_index, .footnote_index,
.footnote_backlink, .footnote_backlink,
.footnote_plugin_index.pointer { .footnote_plugin_index.pointer,
.footnote_plugin_index_combi.pointer {
cursor: pointer; cursor: pointer;
} }
/*
These rules when enabled cause the backlink to take an overline
when hovered in some themes, not in others:
.footnote_plugin_index:hover,
.footnote_plugin_index_combi:hover,
.footnote_plugin_index.pointer:hover,
.footnote_plugin_index_combi.pointer:hover,
*/
.footnote_backlink:hover,
.footnote_plugin_link:hover,
.footnote_plugin_text a:hover {
text-decoration: unset;
text-decoration: underline; /*deprioritized to ease customization*/
}
.footnote_plugin_text { .footnote_plugin_text {
width: unset; /*unset width of text column to fix site issues*/ width: unset; /*unset width of text column to fix site issues*/
} }
/*
prevent long URLs from expanding the reference container in mobile view:
*/
.footnote_plugin_text a {
word-wrap: anywhere;
}
/*
These rules are just defauls preventing the table from filling the width.
They are not very effective by lack of table-layout: fixed;
since 2.1.4 settings are optionally available, with table-layout: fixed;
By default, the backlink column is auto-expanding to fit widest.
Not using 'max-content' as that causes no-wrap and overflows.
These are overridden if settings are enabled.
*/
.footnote_plugin_index,
.footnote_plugin_index_combi {
max-width: 100px;
width: 2.5em;
}
/* /*
Responsive Responsive
*/ */
@media only screen and (max-width: 768px) { @media only screen and (max-width: 768px) {
.footnote_plugin_index { .footnote_plugin_index,
max-width: 100px; .footnote_plugin_index_combi {
max-width: 80px;
} }
} }
/**************************************************************** /****************************************************************
Footnotes printing style rules Footnotes printing style rules
@ -279,7 +313,8 @@ link styling is reverted so as to not gray out referrers/numbers.
.footnote_plugin_tooltip_text { .footnote_plugin_tooltip_text {
color: inherit; color: inherit;
} }
.footnote_plugin_index a { .footnote_plugin_index a,
.footnote_plugin_index_combi a {
color: inherit; color: inherit;
text-decoration: none !important; text-decoration: none !important;
} }

View file

@ -4,17 +4,19 @@
* Created-Date: 15.05.14 * Created-Date: 15.05.14
* Created-Time: 16:21 * Created-Time: 16:21
* Since: 1.0 * Since: 1.0
* Version: 2.1.3
* *
* Last modified: 2020-11-24T0957+0100 * Version: 2.1.4
*
* Last modified: 2020-12-06T1649+0100
*/ */
/* MCI Footnotes logo /*****************************************************
* MCI Footnotes logo
* The classes with 'heading' fix display in dashboard
* See class/config.php and css/public.css The classes with 'heading' fix display in dashboard
*/ See class/config.php and css/public.css
*/
.postbox-header { .postbox-header {
position: relative; position: relative;
@ -38,22 +40,74 @@
left: 96px; left: 96px;
} }
/* /*************************************************************************
On User Request: limited to a number of IDs to not affect all dashboards On User Request: limited to a number of IDs to not affect all dashboards
<https://wordpress.org/support/topic/all-input-have-width-80/> <https://wordpress.org/support/topic/all-input-have-width-80/>
*/ */
#footnote_inputfield_placeholder_start_user_defined, /*input[type=text], input[type=password], textarea, select*/
#footnote_inputfield_placeholder_end_user_defined,
#footnote_inputfield_readon_label, #footnote_inputfield_readon_label,
#footnote_inputfield_references_label, #footnote_inputfield_references_label,
#footnote_inputfield_custom_css #footnote_inputfield_custom_css,
/*input[type=text], input[type=password], textarea, select*/ { #footnote_inputfield_love {
padding-left: 8px !important; padding-left: 8px !important;
padding-right: 8px !important; padding-right: 8px !important;
width: 80% !important; width: 80% !important;
} }
textarea { #footnote_inputfield_reference_container_place {
width: 310px;
}
#footnote_inputfield_counter_style,
#footnotes_inputfield_page_layout_support {
width: 505px;
}
#footnote_inputfield_placeholder_start,
#footnote_inputfield_placeholder_end,
#footnote_inputfield_custom_mouse_over_box_excerpt_length,
#footnote_inputfield_custom_mouse_over_box_position {
width: 180px;
}
#footnote_inputfield_placeholder_start_user_defined,
#footnote_inputfield_placeholder_end_user_defined {
width: 320px;
}
#footnote_inputfield_combine_identical,
#footnotes_inputfield_scroll_offset,
#footnotes_inputfield_scroll_duration,
#footnote_inputfield_custom_mouse_over_box_offset_x,
#footnote_inputfield_custom_mouse_over_box_offset_y,
#footnote_inputfield_custom_mouse_over_box_max_width,
#footnotes_inputfield_mouse_over_box_fade_in_delay,
#footnotes_inputfield_mouse_over_box_fade_in_duration,
#footnotes_inputfield_mouse_over_box_fade_out_delay,
#footnotes_inputfield_mouse_over_box_fade_out_duration,
#footnote_inputfield_custom_mouse_over_box_border_width,
#footnote_inputfield_custom_mouse_over_box_border_radius {
width: 80px;
}
#footnote_inputfield_custom_hyperlink_symbol,
#footnotes_inputfield_backlinks_terminator_option,
#footnotes_inputfield_backlinks_separator_option {
width: 230px;
}
#footnotes_inputfield_backlinks_column_width_scalar,
#footnotes_inputfield_backlinks_column_max_width_scalar,
#footnotes_inputfield_mouse_over_box_font_size_scalar {
width: 85px;
}
#footnotes_inputfield_backlinks_column_width_unit,
#footnotes_inputfield_backlinks_column_max_width_unit,
#footnotes_inputfield_mouse_over_box_font_size_unit {
width: 140px;
}
/*textarea*/
#footnote_inputfield_custom_css {
height: 250px; height: 250px;
} }
@ -100,34 +154,49 @@ span.footnote_highlight_placeholder {
text-align: center !important; text-align: center !important;
} }
/* /*********************************************************
initialized from style attributes in templates initialized from style attributes in templates
IE doesnt support nth child, but these are not critical IE doesnt support nth child, but these are not critical
*/ */
.expert-lookup tr th:first-child, #expert-lookup tr th:first-child,
.expert-lookup tr td:first-child { #expert-lookup tr td:first-child {
width: 170px !important; width: 170px !important;
} }
.expert-lookup tr th:nth-child(2), #expert-lookup tr th:nth-child(2),
.expert-lookup tr td:nth-child(2) { #expert-lookup tr td:nth-child(2) {
width: 65px !important; width: 65px !important;
} }
.expert-lookup tr th:nth-child(3), #expert-lookup tr th:nth-child(3),
.expert-lookup tr td:nth-child(3) { #expert-lookup tr td:nth-child(3) {
width: 200px !important; width: 200px !important;
} }
.expert-lookup tr td:nth-child(3) input { #expert-lookup tr td:nth-child(3) input {
width: 190px; width: 190px;
} }
.expert-lookup tr th:last-child, #expert-lookup tr th:last-child,
.expert-lookup tr td:last-child { #expert-lookup tr td:last-child {
white-space: nowrap; white-space: nowrap;
} }
.footnotes-description { #settings-other tr td:nth-child(2) {
width: 30%;
}
/*
fullwidth div above or below settings tables:
*/
.footnotes_description {
padding: 0 10%; padding: 0 10%;
} }
.footnotes-description p { .footnotes_description p {
font-size: 1.4em; font-size: 1.4em;
font-style: italic; font-style: italic;
} }
/*
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:
*/
.footnotes_notice {
font-style: italic;
}

View file

@ -4,11 +4,12 @@
Plugin URI: https://wordpress.org/plugins/footnotes/ 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. 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 Author: Mark Cheret
Version: 2.1.3 Version: 2.1.4
Author URI: http://cheret.de/plugins/footnotes-2/ Author URI: http://cheret.de/plugins/footnotes-2/
Text Domain: footnotes Text Domain: footnotes
Domain Path: /languages Domain Path: /languages
*/ */
define( 'FOOTNOTES_VERSION', '2.1.4' );
/* /*
Copyright 2020 Mark Cheret (email: mark@cheret.de) Copyright 2020 Mark Cheret (email: mark@cheret.de)

View file

@ -25,7 +25,7 @@
* <https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13456762> * <https://wordpress.org/support/topic/tooltip-hover-not-showing/#post-13456762>
* *
* Removed usage of jQuery browser check function 2020-11-12T0127+0100 * Removed usage of jQuery browser check function 2020-11-12T0127+0100
* * ==> this is version 1.2.7redacted
* See also on the Forum: <https://wordpress.org/support/topic/after-wp-5-5-upgrade-jquery-is-deprecated/>, * See also on the Forum: <https://wordpress.org/support/topic/after-wp-5-5-upgrade-jquery-is-deprecated/>,
* lastly <https://wordpress.org/support/topic/jquery-issues-13/> * lastly <https://wordpress.org/support/topic/jquery-issues-13/>
* *
@ -44,7 +44,7 @@
* #6 (420) This disabled slide-fade for Internet Explorer. * #6 (420) This disabled slide-fade for Internet Explorer.
* Browsers not supporting an effect simply dont execute it, they wont throw an error. * Browsers not supporting an effect simply dont execute it, they wont throw an error.
* *
* Re-formatted minified file. Last modified: 2020-11-13T0444+0100 * Halfways minified file. Last modified: 2020-12-04T2140+0100
*/ */
(function (a) { (function (a) {
a.tools = a.tools || {version: "v1.2.7"}; a.tools = a.tools || {version: "v1.2.7"};

View file

@ -4,7 +4,7 @@ Tags: footnote, footnotes, bibliography, formatting, notes, Post, posts, referen
Requires at least: 3.9 Requires at least: 3.9
Tested up to: 5.5 Tested up to: 5.5
Requires PHP: 5.6 Requires PHP: 5.6
Stable Tag: 2.1.3 Stable Tag: 2.1.4
License: GPLv3 or later License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html License URI: http://www.gnu.org/licenses/gpl-3.0.html
@ -80,6 +80,32 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
== Changelog == == Changelog ==
= 2.1.4 =
- Add: Dashboard: Main settings: add settings for scroll offset and duration
- Add: Dashboard: Tooltip settings: add settings for display delays and fade durations
- Add: Styling: Tooltips: fix font size issue by adding font size to settings with legacy as default
- Add: Reference container: fix theme-dependent layout issues by optionally enqueuing additional style sheet
- Add: Reference container: fix layout issues by moving backlink column width to settings
- Add: Reference container: separating and terminating punctuation optional and customizable
- Add: Reference container: Backlinks: optional line breaks to stack enumerations
- Bugfix: Layout: Tooltips: prevent line break in Read-on link label
- Bugfix: Styling: Referrers and backlinks: make link elements optional to fix issues
- Bugfix: Styling: Referrers: disable hover underline
- Bugfix: Reference container, tooltips: fix line wrapping of URLs based on pattern, not link element
- Bugfix: Reference container: Backlink symbol: support for appending when combining identicals is on
- Bugfix: Reference container: Backlinks: deprioritize hover underline to ease customization
- Bugfix: Reference container: Backlinks: fix line breaking with respect to separators and terminators
- Bugfix: Reference container: Label: delete overflow hidden rule
- Bugfix: Reference container: Expand/collapse button: same padding to the right for right-to-left
- Bugfix: Reference container: Styles: re-add the class dedicated to combined footnotes indices
- Bugfix: Dashboard: move arrow settings from Customize to Settings > Reference container to reunite and fix issue with new heading wording
- Bugfix: Dashboard: Main settings: fix layout, raise shortcodes to top
- Bugfix: Dashboard: Tooltip settings: Truncation length: change input box type from text to numeric
- Update: Dashboard: Notices: use explicit italic style
- Bugfix: Dashboard: Other settings: Excerpt: display guidance next to select box
- Bugfix: WordPress hooks: the_content: set priority to 1000 as a safeguard
- Update: Dashboard: Expert mode: streamline and update description for hooks and priority levels
= 2.1.3 = = 2.1.3 =
- Bugfix: disable widget_text hook by default to fix accordions declaring headings as widgets - Bugfix: disable widget_text hook by default to fix accordions declaring headings as widgets
- Bugfix: Reference container: fix column width when combining turned on by reverting new CSS class to legacy - Bugfix: Reference container: fix column width when combining turned on by reverting new CSS class to legacy
@ -90,7 +116,6 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
= 2.1.2 = = 2.1.2 =
- Bugfix: Layout: Reference container: Backlinks: no underline on hover cell when combining identicals is on - Bugfix: Layout: Reference container: Backlinks: no underline on hover cell when combining identicals is on
- Bugfix: Elementor: add experimental support for section name function
- Bugfix: Dashboard: priority level settings for all other hooks - Bugfix: Dashboard: priority level settings for all other hooks
- Update: Dashboard: WordPress documentation URLs of the hooks - Update: Dashboard: WordPress documentation URLs of the hooks
- Update: Dashboard: feature description for the hooks priority level settings (not yet localized) - Update: Dashboard: feature description for the hooks priority level settings (not yet localized)

View file

@ -1,27 +1,27 @@
<table class="widefat fixed"> <table id="customize-css" class="widefat fixed">
<tbody> <tbody>
<tr> <tr>
<td>[[label-css]]</td> <td>[[label-css]]</td>
<td>[[css]]</td> <td>[[css]]</td>
</tr> </tr>
<tr> <tr>
<td colspan="2">[[headline]]</td> <td colspan="2">[[headline]]</td>
</tr> </tr>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td><strong>[[label-class-1]]</strong><br/><em>[[class-1]]</em></td> <td><strong>[[label-class-1]]</strong><br/><em>[[class-1]]</em></td>
</tr> </tr>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td><strong>[[label-class-2]]</strong><br/><em>[[class-2]]</em></td> <td><strong>[[label-class-2]]</strong><br/><em>[[class-2]]</em></td>
</tr> </tr>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td><strong>[[label-class-3]]</strong><br/><em>[[class-3]]</em></td> <td><strong>[[label-class-3]]</strong><br/><em>[[class-3]]</em></td>
</tr> </tr>
<tr> <tr>
<td>&nbsp;</td> <td>&nbsp;</td>
<td><strong>[[label-class-4]]</strong><br/><em>[[class-4]]</em></td> <td><strong>[[label-class-4]]</strong><br/><em>[[class-4]]</em></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View file

@ -1,12 +0,0 @@
<table class="widefat fixed">
<tbody>
<tr>
<td>[[label-symbol]]</td>
<td>[[symbol]]</td>
</tr>
<tr>
<td>[[label-user-defined]]</td>
<td>[[user-defined]]<br/><i>[[comment]]</i></td>
</tr>
</tbody>
</table>

View file

@ -1,64 +1,84 @@
<table class="widefat fixed"> <table id="customize-mouse-over-box" class="widefat fixed">
<tbody> <tbody>
<tr> <tr>
<td>[[label-enable]]</td> <td>[[label-enable]]</td>
<td>[[enable]]</td> <td>[[enable]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-alternative]]</td> <td>[[label-alternative]]</td>
<td>[[alternative]]</td> <td>[[alternative]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-activate-excerpt]]</td> <td>[[label-activate-excerpt]]</td>
<td>[[activate-excerpt]]</td> <td>[[activate-excerpt]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-excerpt-length]]</td> <td>[[label-excerpt-length]]</td>
<td>[[excerpt-length]]</td> <td>[[excerpt-length]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-readon]]</td> <td>[[label-readon]]</td>
<td>[[readon]]</td> <td>[[readon]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-position]]</td> <td>[[label-position]]</td>
<td>[[position]]</td> <td>[[position]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-offset-x]]</td> <td>[[label-offset-x]]</td>
<td>[[offset-x]] <em>[[notice-offset-x]]</em></td> <td>[[offset-x]] <span class="footnotes_notice">[[notice-offset-x]]</span></td>
</tr> </tr>
<tr> <tr>
<td>[[label-offset-y]]</td> <td>[[label-offset-y]]</td>
<td>[[offset-y]] <em>[[notice-offset-y]]</em></td> <td>[[offset-y]] <span class="footnotes_notice">[[notice-offset-y]]</span></td>
</tr> </tr>
<tr> <tr>
<td>[[label-color]]</td> <td>[[label-max-width]]</td>
<td>[[color]] <em>[[notice-color]]</em></td> <td>[[max-width]] <span class="footnotes_notice">[[notice-max-width]]</span></td>
</tr> </tr>
<tr> <tr>
<td>[[label-background]]</td> <td>[[label-fade-in-delay]]</td>
<td>[[background]] <em>[[notice-background]]</em></td> <td>[[fade-in-delay]] <span class="footnotes_notice">[[notice-fade-in-delay]]</span></td>
</tr> </tr>
<tr> <tr>
<td>[[label-border-width]]</td> <td>[[label-fade-in-duration]]</td>
<td>[[border-width]] <em>[[notice-border-width]]</em></td> <td>[[fade-in-duration]] <span class="footnotes_notice">[[notice-fade-in-duration]]</span></td>
</tr> </tr>
<tr> <tr>
<td>[[label-border-color]]</td> <td>[[label-fade-out-delay]]</td>
<td>[[border-color]] <em>[[notice-border-color]]</em></td> <td>[[fade-out-delay]] <span class="footnotes_notice">[[notice-fade-out-delay]]</span></td>
</tr> </tr>
<tr> <tr>
<td>[[label-border-radius]]</td> <td>[[label-fade-out-duration]]</td>
<td>[[border-radius]] <em>[[notice-border-radius]]</em></td> <td>[[fade-out-duration]] <span class="footnotes_notice">[[notice-fade-out-duration]]</span></td>
</tr> </tr>
<tr> <tr>
<td>[[label-max-width]]</td> <td>[[label-font-size]]</td>
<td>[[max-width]] <em>[[notice-max-width]]</em></td> <td>[[font-size-enable]][[font-size-scalar]][[font-size-unit]] <span class="footnotes_notice">[[notice-font-size]]</span></td>
</tr> </tr>
<tr> <tr>
<td>[[label-box-shadow-color]]</td> <td>[[label-color]]</td>
<td>[[box-shadow-color]] <em>[[notice-box-shadow-color]]</em></td> <td>[[color]] <span class="footnotes_notice">[[notice-color]]</span></td>
</tr> </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> </tbody>
</table> </table>

View file

@ -1,16 +1,16 @@
<table class="widefat fixed"> <table id="customize-superscript" class="widefat fixed">
<tbody> <tbody>
<tr> <tr>
<td>[[label-superscript]]</td> <td>[[label-superscript]]</td>
<td>[[superscript]]</td> <td>[[superscript]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-before]]</td> <td>[[label-before]]</td>
<td>[[before]]</td> <td>[[before]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-after]]</td> <td>[[label-after]]</td>
<td>[[after]]</td> <td>[[after]]</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View file

@ -1,37 +1,37 @@
<table class="widefat fixed"> <table id="diagnostics" class="widefat fixed">
<tbody> <tbody>
<tr> <tr>
<td>[[label-server]]</td> <td>[[label-server]]</td>
<td>[[server]]</td> <td>[[server]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-php]]</td> <td>[[label-php]]</td>
<td>[[php]]</td> <td>[[php]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-user-agent]]</td> <td>[[label-user-agent]]</td>
<td>[[user-agent]]</td> <td>[[user-agent]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-max-execution-time]]</td> <td>[[label-max-execution-time]]</td>
<td>[[max-execution-time]]</td> <td>[[max-execution-time]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-memory-limit]]</td> <td>[[label-memory-limit]]</td>
<td>[[memory-limit]]</td> <td>[[memory-limit]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-php-extensions]]</td> <td>[[label-php-extensions]]</td>
<td>[[php-extensions]]</td> <td>[[php-extensions]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-wordpress]]</td> <td>[[label-wordpress]]</td>
<td>[[wordpress]]</td> <td>[[wordpress]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-theme]]</td> <td>[[label-theme]]</td>
<td>[[theme]]</td> <td>[[theme]]</td>
</tr> </tr>
[[plugins]] [[plugins]]
</tbody> </tbody>
</table> </table>

View file

@ -1,51 +1,50 @@
<div class="expert-lookup footnotes-description"> <div class="footnotes_description">
<p>[[description-1]]</p> <p>[[description-1]]</p>
<p>[[description-2]]</p> <p>[[description-2]] [[description-3]]</p>
<p>[[description-3]]</p>
<p>[[description-4]]</p> <p>[[description-4]]</p>
<p>[[description-5]]</p>
<p>[[description-6]]</p>
<p>[[description-7]]</p>
</div> </div>
<table class="expert-lookup widefat fixed"> <table id="expert-lookup" class="widefat fixed">
<thead> <thead>
<tr> <tr>
<th>[[head-hook]]</th> <th>[[head-hook]]</th>
<th>[[head-checkbox]]</th> <th>[[head-checkbox]]</th>
<th>[[head-numbox]]</th> <th>[[head-numbox]]</th>
<th>[[head-url]]</th> <th>[[head-url]]</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<td>[[label-the-title]]</td> <td>[[label-the-title]]</td>
<td>[[the-title]]</td> <td>[[the-title]]</td>
<td>[[priority-the-title]]</td> <td>[[priority-the-title]]</td>
<td><a href="[[url-the-title]]" target="_blank">[[url-the-title]]</a></td> <td><a href="[[url-the-title]]" target="_blank">[[url-the-title]]</a></td>
</tr> </tr>
<tr> <tr>
<td>[[label-the-content]]</td> <td>[[label-the-content]]</td>
<td>[[the-content]]</td> <td>[[the-content]]</td>
<td>[[priority-the-content]]</td> <td>[[priority-the-content]]</td>
<td><a href="[[url-the-content]]" target="_blank">[[url-the-content]]</a></td> <td><a href="[[url-the-content]]" target="_blank">[[url-the-content]]</a></td>
</tr> </tr>
<tr> <tr>
<td>[[label-the-excerpt]]</td> <td>[[label-the-excerpt]]</td>
<td>[[the-excerpt]]</td> <td>[[the-excerpt]]</td>
<td>[[priority-the-excerpt]]</td> <td>[[priority-the-excerpt]]</td>
<td><a href="[[url-the-excerpt]]" target="_blank">[[url-the-excerpt]]</a></td> <td><a href="[[url-the-excerpt]]" target="_blank">[[url-the-excerpt]]</a></td>
</tr> </tr>
<tr> <tr>
<td>[[label-widget-title]]</td> <td>[[label-widget-title]]</td>
<td>[[widget-title]]</td> <td>[[widget-title]]</td>
<td>[[priority-widget-title]]</td> <td>[[priority-widget-title]]</td>
<td><a href="[[url-widget-title]]" target="_blank">[[url-widget-title]]</a></td> <td><a href="[[url-widget-title]]" target="_blank">[[url-widget-title]]</a></td>
</tr> </tr>
<tr> <tr>
<td>[[label-widget-text]]</td> <td>[[label-widget-text]]</td>
<td>[[widget-text]]</td> <td>[[widget-text]]</td>
<td>[[priority-widget-text]]</td> <td>[[priority-widget-text]]</td>
<td><a href="[[url-widget-text]]" target="_blank">[[url-widget-text]]</a></td> <td><a href="[[url-widget-text]]" target="_blank">[[url-widget-text]]</a></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div class="footnotes_description">
<p>[[description-5]]</p>
</div>

View file

@ -1,12 +1,12 @@
<table class="widefat fixed"> <table id="settings-love" class="widefat fixed">
<tbody> <tbody>
<tr> <tr>
<td>[[label-love]]</td> <td>[[label-love]]</td>
<td>[[love]]</td> <td>[[love]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-no-love]]</td> <td>[[label-no-love]]</td>
<td>[[no-love]]</td> <td>[[no-love]]</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View file

@ -1,12 +1,17 @@
<table class="widefat fixed"> <table id="settings-other" class="widefat fixed">
<tbody> <tbody>
<tr> <tr>
<td>[[label-excerpt]]</td> <td>[[label-link]]</td>
<td>[[excerpt]]</td> <td>[[link]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-expert-mode]]</td> <td>[[label-excerpt]]</td>
<td>[[expert-mode]]</td> <td>[[excerpt]]<span class="footnotes_notice">[[notice1-excerpt]]</span></td>
</tr> <td><span class="footnotes_notice">[[notice2-excerpt]]<br />[[notice3-excerpt]]</span></td>
</tbody> </tr>
</table> <tr>
<td>[[label-expert-mode]]</td>
<td>[[expert-mode]]</td>
</tr>
</tbody>
</table>

View file

@ -1,32 +1,84 @@
<table class="widefat fixed"> <table id="settings-reference-container" class="widefat fixed">
<tbody> <tbody>
<tr> <tr>
<td>[[label-name]]</td> <td>[[label-name]]</td>
<td>[[name]]</td> <td>[[name]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-collapse]]</td> <td>[[label-collapse]]</td>
<td>[[collapse]]</td> <td>[[collapse]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-3column]]</td> <td>[[label-position]]</td>
<td>[[3column]]</td> <td>[[position]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-symbol]]</td> <td>[[label-page-layout]]</td>
<td>[[symbol]]</td> <td>[[page-layout]] <span class="footnotes_notice">[[notice-page-layout]]</span></td>
</tr> </tr>
<tr> <tr>
<td>[[label-switch]]</td> <td>[[label-startpage]]</td>
<td>[[switch]]</td> <td>[[startpage]]</td>
</tr> </tr>
<tr> <tr>
<td>[[label-position]]</td> <td>[[label-symbol]]</td>
<td>[[position]]</td> <td>
</tr> [[symbol-enable]]
<tr> [[symbol-options]]
<td>[[label-startpage]]</td> [[symbol-custom]]
<td>[[startpage]]</td> <span class="footnotes_notice">[[notice-symbol]]</span>
</tr> </td>
</tbody> </tr>
<tr>
<td>[[label-switch]]</td>
<td>[[switch]]</td>
</tr>
<tr>
<td>[[label-3column]]</td>
<td>
[[3column]]
<span class="footnotes_notice">[[notice-3column]]</span>
</td>
</tr>
<tr>
<td>[[label-separator]]</td>
<td>
[[separator-enable]]
[[separator-options]]
[[separator-custom]]
<span class="footnotes_notice">[[notice-separator]]</span>
</td>
</tr>
<tr>
<td>[[label-terminator]]</td>
<td>
[[terminator-enable]]
[[terminator-options]]
[[terminator-custom]]
<span class="footnotes_notice">[[notice-terminator]]</span>
</td>
</tr>
<tr>
<td>[[label-width]]</td>
<td>
[[width-enable]]
[[width-scalar]]
[[width-unit]]
<span class="footnotes_notice">[[notice-width]]</span>
</td>
</tr>
<tr>
<td>[[label-max-width]]</td>
<td>
[[max-width-enable]]
[[max-width-scalar]]
[[max-width-unit]]
<span class="footnotes_notice">[[notice-max-width]]</span>
</td>
</tr>
<tr>
<td>[[label-line-break]]</td>
<td>[[line-break]]</td>
</tr>
</tbody>
</table> </table>

View file

@ -1,56 +1,62 @@
<table class="widefat fixed"> <table id="settings-styling" class="widefat fixed">
<tbody> <tbody>
<tr> <tr>
<td>[[label-identical]]</td> <td>[[label-short-code-start]]</td>
<td>[[identical]]</td> <td>
</tr> <span>[[short-code-start]]</span>
<tr> <span>[[short-code-start-user]]</span>
<td>[[label-short-code-start]]</td> </td>
<td>[[short-code-start]]</td> </tr>
</tr> <tr>
<tr> <td>[[label-short-code-end]]</td>
<td>[[label-short-code-end]]</td> <td>
<td>[[short-code-end]]</td> <span>[[short-code-end]]</span>
</tr> <span>[[short-code-end-user]]</span>
<tr> </td>
<td>[[label-short-code-start-user]]</td> </tr>
<td>[[short-code-start-user]]</td> <tr>
</tr> <td>[[label-counter-style]]</td>
<tr> <td>[[counter-style]]</td>
<td>[[label-short-code-end-user]]</td> </tr>
<td>[[short-code-end-user]]</td> <tr>
</tr> <td>[[label-identical]]</td>
<tr> <td>[[identical]]</td>
<td>[[label-counter-style]]</td> </tr>
<td>[[counter-style]]</td> <tr>
</tr> <td>[[label-scroll-offset]]</td>
</tbody> <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> </table>
<script type="text/javascript"> <script type="text/javascript">
var l_obj_ShortCodeStart = jQuery("#[[short-code-start-id]]"); var l_obj_ShortCodeStart = jQuery("#[[short-code-start-id]]");
var l_obj_ShortCodeEnd = jQuery("#[[short-code-end-id]]"); var l_obj_ShortCodeEnd = jQuery("#[[short-code-end-id]]");
var l_obj_ShortCodeStartUserDefined = jQuery("#[[short-code-start-user-id]]"); var l_obj_ShortCodeStartUserDefined = jQuery("#[[short-code-start-user-id]]");
var l_obj_ShortCodeEndUserDefined = jQuery("#[[short-code-end-user-id]]"); var l_obj_ShortCodeEndUserDefined = jQuery("#[[short-code-end-user-id]]");
function footnotes_Display_UserDefined_Placeholders() { function footnotes_Display_UserDefined_Placeholders() {
if (l_obj_ShortCodeStart.val() == "userdefined") { if (l_obj_ShortCodeStart.val() == "userdefined") {
l_obj_ShortCodeStartUserDefined.parent().parent().show(); l_obj_ShortCodeStartUserDefined.parent().show();
l_obj_ShortCodeEndUserDefined.parent().parent().show(); l_obj_ShortCodeEndUserDefined.parent().show();
} else { } else {
l_obj_ShortCodeStartUserDefined.parent().parent().hide(); l_obj_ShortCodeStartUserDefined.parent().hide();
l_obj_ShortCodeEndUserDefined.parent().parent().hide(); l_obj_ShortCodeEndUserDefined.parent().hide();
} }
} }
footnotes_Display_UserDefined_Placeholders(); footnotes_Display_UserDefined_Placeholders();
l_obj_ShortCodeStart.on('change', function() { l_obj_ShortCodeStart.on('change', function() {
var l_int_SelectedIndex = jQuery(this).prop("selectedIndex"); var l_int_SelectedIndex = jQuery(this).prop("selectedIndex");
jQuery('#[[short-code-end-id]] option:eq(' + l_int_SelectedIndex + ')').prop('selected', true); jQuery('#[[short-code-end-id]] option:eq(' + l_int_SelectedIndex + ')').prop('selected', true);
footnotes_Display_UserDefined_Placeholders(); footnotes_Display_UserDefined_Placeholders();
}); });
l_obj_ShortCodeEnd.on('change', function() { l_obj_ShortCodeEnd.on('change', function() {
var l_int_SelectedIndex = jQuery(this).prop("selectedIndex"); var l_int_SelectedIndex = jQuery(this).prop("selectedIndex");
jQuery('#[[short-code-start-id]] option:eq(' + l_int_SelectedIndex + ')').prop('selected', true); jQuery('#[[short-code-start-id]] option:eq(' + l_int_SelectedIndex + ')').prop('selected', true);
footnotes_Display_UserDefined_Placeholders(); footnotes_Display_UserDefined_Placeholders();
}); });
</script> </script>

View file

@ -2,12 +2,12 @@
class="footnote_referrer relative" class="footnote_referrer relative"
onmouseover="footnoteTooltipShow('footnote_plugin_tooltip_text_[[post_id]]_[[id]]')" onmouseover="footnoteTooltipShow('footnote_plugin_tooltip_text_[[post_id]]_[[id]]')"
onmouseout="footnoteTooltipHide('footnote_plugin_tooltip_text_[[post_id]]_[[id]]')" onmouseout="footnoteTooltipHide('footnote_plugin_tooltip_text_[[post_id]]_[[id]]')"
><a><[[element]] >[[link-start]]<[[sup-span]]
id="footnote_plugin_tooltip_[[post_id]]_[[id]]" id="footnote_plugin_tooltip_[[post_id]]_[[id]]"
class="footnote_plugin_tooltip_text" class="footnote_plugin_tooltip_text"
onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_reference_[[post_id]]_[[id]]');" onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_reference_[[post_id]]_[[id]]');"
>[[before]][[index]][[after]]</[[element]] >[[before]][[index]][[after]]</[[sup-span]]
></a><span >[[link-end]]<span
id="footnote_plugin_tooltip_text_[[post_id]]_[[id]]" id="footnote_plugin_tooltip_text_[[post_id]]_[[id]]"
class="footnote_tooltip position hidden" class="footnote_tooltip position hidden"
onmouseout="footnoteTooltipHide('footnote_plugin_tooltip_text_[[post_id]]_[[id]]')" onmouseout="footnoteTooltipHide('footnote_plugin_tooltip_text_[[post_id]]_[[id]]')"

View file

@ -1,11 +1,11 @@
<span <span
class="footnote_referrer" class="footnote_referrer"
><a><[[element]] >[[link-start]]<[[sup-span]]
id="footnote_plugin_tooltip_[[post_id]]_[[id]]" id="footnote_plugin_tooltip_[[post_id]]_[[id]]"
class="footnote_plugin_tooltip_text" class="footnote_plugin_tooltip_text"
onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_reference_[[post_id]]_[[id]]');" onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_reference_[[post_id]]_[[id]]');"
>[[before]][[index]][[after]]</[[element]] >[[before]][[index]][[after]]</[[sup-span]]
></a><span >[[link-end]]<span
id="footnote_plugin_tooltip_text_[[post_id]]_[[id]]" id="footnote_plugin_tooltip_text_[[post_id]]_[[id]]"
class="footnote_tooltip" class="footnote_tooltip"
>[[text]]</span >[[text]]</span

View file

@ -1,20 +1,20 @@
<tr> <tr>
<td <td
class="footnote_plugin_index" class="footnote_plugin_index"
><span ><[[link-span]]
id="footnote_plugin_reference_[[post_id]]_[[id]]" id="footnote_plugin_reference_[[post_id]]_[[id]]"
class="footnote_index" class="footnote_index"
onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_tooltip_[[post_id]]_[[id]]');" onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_tooltip_[[post_id]]_[[id]]');"
>[[index]].</span >[[index]][[terminator]]</[[link-span]]
></td> ></td
<td ><td
class="footnote_plugin_link" class="footnote_plugin_link"
><span ><[[link-span]]
onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_tooltip_[[post_id]]_[[id]]');" onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_tooltip_[[post_id]]_[[id]]');"
class="footnote_backlink" class="footnote_backlink"
>[[arrow]]</span >[[arrow]]</[[link-span]]
></td> ></td
<td ><td
class="footnote_plugin_text" class="footnote_plugin_text"
>[[text]]</td >[[text]]</td
> >

View file

@ -1,6 +1,6 @@
<tr> <tr>
<td <td
class="footnote_plugin_index[[pointer]]" class="footnote_plugin_index_combi[[pointer]]"
[[event]] [[event]]
>[[backlinks]]</td> >[[backlinks]]</td>
<td <td

View file

@ -3,9 +3,9 @@
id="footnote_plugin_reference_[[post_id]]_[[id]]" id="footnote_plugin_reference_[[post_id]]_[[id]]"
class="footnote_plugin_index pointer" class="footnote_plugin_index pointer"
onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_tooltip_[[post_id]]_[[id]]');" onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_tooltip_[[post_id]]_[[id]]');"
><span ><[[link-span]]
class="footnote_plugin_link" class="footnote_plugin_link"
>[[index]].[[arrow]]</span >[[index]][[terminator]][[arrow]]</[[link-span]]
></td> ></td>
<td <td
class="footnote_plugin_text" class="footnote_plugin_text"

View file

@ -3,9 +3,9 @@
id="footnote_plugin_reference_[[post_id]]_[[id]]" id="footnote_plugin_reference_[[post_id]]_[[id]]"
class="footnote_plugin_index pointer" class="footnote_plugin_index pointer"
onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_tooltip_[[post_id]]_[[id]]');" onclick="footnote_moveToAnchor_[[post_id]]('footnote_plugin_tooltip_[[post_id]]_[[id]]');"
><a ><[[link-span]]
class="footnote_plugin_link" class="footnote_plugin_link"
>[[arrow]][[index]]</a >[[arrow]][[index]][[terminator]]</[[link-span]]
></td> ></td>
<td <td
class="footnote_plugin_text" class="footnote_plugin_text"

View file

@ -53,9 +53,9 @@
var l_obj_Target = jQuery('#' + p_str_TargetID); var l_obj_Target = jQuery('#' + p_str_TargetID);
if (l_obj_Target.length) { if (l_obj_Target.length) {
jQuery('html, body').animate({ jQuery('html, body').animate({
scrollTop: l_obj_Target.offset().top - window.innerHeight * 0.20 scrollTop: l_obj_Target.offset().top - window.innerHeight * [[scroll-offset]]
}, },
380);/*duration*/ [[scroll-duration]]);
} }
} }
</script> </script>

View file

@ -3,10 +3,10 @@
tip: '#footnote_plugin_tooltip_text_[[post_id]]_[[id]]', tip: '#footnote_plugin_tooltip_text_[[post_id]]_[[id]]',
tipClass: 'footnote_tooltip', tipClass: 'footnote_tooltip',
effect: 'fade', effect: 'fade',
predelay: 0, predelay: [[fade-in-delay]],
fadeInSpeed: 200, fadeInSpeed: [[fade-in-duration]],
delay: 400, delay: [[fade-out-delay]],
fadeOutSpeed: 200, fadeOutSpeed: [[fade-out-duration]],
position: '[[position]]', position: '[[position]]',
relative: true, relative: true,
offset: [[[offset-y]], [[offset-x]]], offset: [[[offset-y]], [[offset-x]]],