prerelease 2.2.2 because 2.2.1 is a quick patch and cannot be kept

git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2439670 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
pewgeuges 2020-12-15 10:01:17 +00:00
parent 54051772b1
commit 6c7854352b
14 changed files with 265 additions and 139 deletions

View file

@ -16,8 +16,9 @@
* 2.1.6 remove expert mode setting as irrelevant 2020-12-09T2105+0100
* 2.2.0 add options, redistribute, update strings 2020-12-12T2135+0100
* 2.2.0 shortcode for reference container custom position 2020-12-13T2055+0100
* 2.2.2 Custom CSS settings container migration 2020-12-15T0709+0100
*
* Last modified: 2020-12-14T1404+0100
* Last modified: 2020-12-15T0928+0100
*/
/**
@ -79,7 +80,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
$l_arr_Tabs = array();
$l_arr_Tabs[] = $this->addSection("settings", __("General settings", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 0, true);
$l_arr_Tabs[] = $this->addSection("customize", __("Referrers and tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 1, true);
$l_arr_Tabs[] = $this->addSection("expert", __("Priority and CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 2, true);
$l_arr_Tabs[] = $this->addSection("expert", __("Priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 2, true);
$l_arr_Tabs[] = $this->addSection("customcss", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), 3, true);
$l_arr_Tabs[] = $this->addSection("how-to", __("Quick start guide", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), null, false);
return $l_arr_Tabs;
}
@ -107,28 +109,36 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
* @since 2.1.6 / 2.2.0 tabs reordered and renamed
*/
protected function getMetaBoxes() {
return array(
$this->addMetaBox("settings", "start-end", __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "StartEnd"),
$this->addMetaBox("settings", "numbering", __("Footnotes numbering", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Numbering"),
$this->addMetaBox("settings", "scrolling", __("Scrolling behavior", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Scrolling"),
$this->addMetaBox("settings", "reference-container", __("Reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "ReferenceContainer"),
$this->addMetaBox("settings", "excerpts", __("Footnotes in excerpts", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Excerpts"),
$this->addMetaBox("settings", "love", MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, "Love"),
$l_arr_MetaBoxes = array();
$this->addMetaBox("customize", "superscript", __("Referrer typesetting and formatting", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Superscript"),
$this->addMetaBox("customize", "mouse-over-box", __("Tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBox"),
$this->addMetaBox("customize", "mouse-over-box-truncation", __("Tooltip truncation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTruncation"),
$this->addMetaBox("customize", "mouse-over-box-position", __("Tooltip position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxPosition"),
$this->addMetaBox("customize", "mouse-over-box-timing", __("Tooltip timing", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTiming"),
$this->addMetaBox("customize", "mouse-over-box-appearance", __("Tooltip appearance", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxAppearance"),
$this->addMetaBox("customize", "custom-css", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSS"),
$l_arr_MetaBoxes[] = $this->addMetaBox("settings", "start-end", __("Footnote start and end short codes", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "StartEnd");
$l_arr_MetaBoxes[] = $this->addMetaBox("settings", "numbering", __("Footnotes numbering", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Numbering");
$l_arr_MetaBoxes[] = $this->addMetaBox("settings", "scrolling", __("Scrolling behavior", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Scrolling");
$l_arr_MetaBoxes[] = $this->addMetaBox("settings", "reference-container", __("Reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "ReferenceContainer");
$l_arr_MetaBoxes[] = $this->addMetaBox("settings", "excerpts", __("Footnotes in excerpts", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Excerpts");
$l_arr_MetaBoxes[] = $this->addMetaBox("settings", "love", MCI_Footnotes_Config::C_STR_PLUGIN_HEADING_NAME . ' ' . MCI_Footnotes_Config::C_STR_LOVE_SYMBOL_HEADING, "Love");
$this->addMetaBox("expert", "lookup", __("WordPress hooks and priority levels", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "LookupHooks"),
$this->addMetaBox("expert", "custom-css", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSS"),
$l_arr_MetaBoxes[] = $this->addMetaBox("customize", "superscript", __("Referrer typesetting and formatting", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Superscript");
$l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box", __("Tooltips", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBox");
$l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-truncation", __("Tooltip truncation", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTruncation");
$l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-position", __("Tooltip position", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxPosition");
$l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-timing", __("Tooltip timing", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxTiming");
$l_arr_MetaBoxes[] = $this->addMetaBox("customize", "mouse-over-box-appearance", __("Tooltip appearance", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "MouseOverBoxAppearance");
if (!MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_MIGRATED))) {
$l_arr_MetaBoxes[] = $this->addMetaBox("customize", "custom-css", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSS");
}
$this->addMetaBox("how-to", "help", __("Brief introduction in how to use the plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Help"),
$this->addMetaBox("how-to", "donate", __("Help us to improve our Plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Donate")
);
$l_arr_MetaBoxes[] = $this->addMetaBox("expert", "lookup", __("WordPress hooks with priority level", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "LookupHooks");
if (!MCI_Footnotes_Convert::toBool(MCI_Footnotes_Settings::instance()->get(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_MIGRATED))) {
$l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-migration", __("Your existing Custom CSS code", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSMigration");
}
$l_arr_MetaBoxes[] = $this->addMetaBox("customcss", "custom-css-new", __("Custom CSS", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "CustomCSSNew");
$l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "help", __("Brief introduction in how to use the plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Help");
$l_arr_MetaBoxes[] = $this->addMetaBox("how-to", "donate", __("Help us to improve our Plugin", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), "Donate");
return $l_arr_MetaBoxes;
}
/**
@ -149,10 +159,10 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
);
// 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),
"none" => __("no additional external style sheet", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"reference-container" => __("only to the reference container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"page-content" => __("to the div element starting below the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"main-content" => __("to the main element including the post title", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
);
// options for the separating punctuation between backlinks:
// Unicode names are conventionally uppercase.
@ -194,13 +204,13 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"label-collapse" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, __("Collapse by default:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"collapse" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, $l_arr_Enabled),
"label-shortcode" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __("Position shortcode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"shortcode" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE),
"notice-shortcode" => __("If present in the content, this shortcode will be replaced with the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-position" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, __("Default position:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_Positions),
"notice-position" => __("Will be overridden in the presence of the shortcode.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"notice-position" => sprintf(__("To use the position shortcode, please set the position to: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), '<span style="font-style: normal;">' . __("at the end of the post", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . '</span>'),
"label-shortcode" => $this->addLabel(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE, __("Position shortcode:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"shortcode" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE),
"notice-shortcode" => __("If present in the content, any shortcode in this text box will be replaced with the reference container.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"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),
@ -504,9 +514,7 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"after" => $this->addTextBox(MCI_Footnotes_Settings::C_STR_FOOTNOTES_STYLING_AFTER),
"label-link" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, __("Use the link element for referrers and backlinks:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"link" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_LINK_ELEMENT_ENABLED, $l_arr_Enabled),
"notice-link" => __("The link element is needed to apply the themes link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"description-link" => __("If the link element is not desired for styling, a simple span is used instead when the above is set to No. The link addresses have been removed. Else footnote clicks are logged in the browsing history and make the back button unusable.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"notice-link" => __("Please find this setting at the end of the reference container settings. The link element is needed to apply the themes link color.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
)
);
// display template with replaced placeholders
@ -682,11 +690,13 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"label-color" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR, __("Text color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR),
"notice-color" => __("To use the current themes default text color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . ' ' . __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
// To use default: Clear or leave empty.
"notice-color" => sprintf(__("To use the current themes default text color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"label-background" => $this->addLabel(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND, __("Background color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"background" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND),
"notice-background" => __("To use the current themes default background color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . ' ' . __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
// To use default: Clear or leave empty.
"notice-background" => sprintf(__("To use the current themes default background color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", 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:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"border-width" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH, 0, 4, true),
@ -694,7 +704,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"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)),
"border-color" => $this->addColorSelection(MCI_Footnotes_Settings::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR),
"notice-border-color" => __("To use the current themes default border color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . ' ' . __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
// To use default: Clear or leave empty.
"notice-border-color" => sprintf(__("To use the current themes default border color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"label-border-radius" => $this->addLabel(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, __("Rounded corner radius:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"border-radius" => $this->addNumBox(MCI_Footnotes_Settings::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS, 0, 500),
@ -702,7 +713,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
"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),
"notice-box-shadow-color" => __("To use the current themes default box shadow color:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME) . ' ' . __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
// To use default: Clear or leave empty.
"notice-box-shadow-color" => sprintf(__("To use the current themes default box shadow color: %s", MCI_Footnotes_Config::C_STR_PLUGIN_NAME), __("Clear or leave empty.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
)
);
@ -736,6 +748,8 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
* list directly in the template, as CSS is in English anyway
* @see templates/dashboard/customize-css.html
* 2020-12-09T1113+0100
*
* 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0506+0100
*/
public function CustomCSS() {
// load template file
@ -743,10 +757,9 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
// replace all placeholders
$l_obj_Template->replace(
array(
// "label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Add custom CSS:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS),
"headline" => $this->addText(__("Recommended CSS classes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe. Please cut and paste the content into the new text area under the new tab.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
// CSS classes are listed in the template.
// Localized notices are dropped to ease translators task.
@ -768,6 +781,42 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
echo $l_obj_Template->getContent();
}
public function CustomCSSMigration() {
// load template file
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-migration");
// replace all placeholders
$l_obj_Template->replace(
array(
"label-css" => $this->addLabel(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS, __("Your existing Custom CSS code:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
"css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS),
"description-css" => __('Custom CSS migrates to a dedicated tab. This text area is intended to keep your data safe. Please cut and paste the content into the new text area under the new tab.', MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
"label-migrated" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_MIGRATED, "Custom CSS migration complete:"),
"migrated" => $this->addCheckbox(MCI_Footnotes_Settings::C_BOOL_CUSTOM_CSS_MIGRATED),
"notice-migrated" => __("Please check this box when you are done migrating. After saving while this box is checked, the legacy Custom CSS containers are going to disappear.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
)
);
// display template with replaced placeholders
echo $l_obj_Template->getContent();
}
public function CustomCSSNew() {
// load template file
$l_obj_Template = new MCI_Footnotes_Template(MCI_Footnotes_Template::C_STR_DASHBOARD, "customize-css-new");
// replace all placeholders
$l_obj_Template->replace(
array(
"css" => $this->addTextArea(MCI_Footnotes_Settings::C_STR_CUSTOM_CSS_NEW),
"headline" => $this->addText(__("Recommended CSS classes:", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
)
);
// display template with replaced placeholders
echo $l_obj_Template->getContent();
}
/**
* Displays available Hooks to look for Footnote short codes.
*

View file

@ -21,8 +21,9 @@
* 2.1.6 option to disable URL line wrapping 2020-12-09T1606+0100
* 2.1.6 set default priority level of the_content to 98 2020-12-10T0447+0100
* 2.2.0 reference container custom position shortcode 2020-12-13T2056+0100
* 2.2.2 Custom CSS settings container migration 2020-12-15T0709+0100
*
* Last modified: 2020-12-13T2123+0100
* Last modified: 2020-12-15T0744+0100
*/
@ -320,8 +321,13 @@ class MCI_Footnotes_Settings {
* @author Stefan Herndler
* @since 1.5.0
* @var string
*
* Edited:
* 2.2.2 migrate Custom CSS to a dedicated tab 2020-12-15T0520+0100
*/
const C_STR_CUSTOM_CSS = "footnote_inputfield_custom_css";
const C_STR_CUSTOM_CSS_NEW = "footnote_inputfield_custom_css_new";
const C_BOOL_CUSTOM_CSS_MIGRATED = "footnote_inputfield_custom_css_migrated";
/**
* Settings Container Key the activation of the_title hook.
@ -504,8 +510,18 @@ class MCI_Footnotes_Settings {
* @author Stefan Herndler
* @since 1.5.0
* @var array
*
* Edited:
* 2.2.2 added tab for Custom CSS 2020-12-15T0740+0100
*
* These are the storage container names, one per dashboard tab.
*/
private $a_arr_Container = array("footnotes_storage", "footnotes_storage_custom", "footnotes_storage_expert");
private $a_arr_Container = array(
"footnotes_storage",
"footnotes_storage_custom",
"footnotes_storage_expert",
"footnotes_storage_custom_css",
);
/**
* Contains all Default Settings for each Settings Container.
@ -649,7 +665,9 @@ class MCI_Footnotes_Settings {
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666',
self::C_STR_HYPERLINK_ARROW => '&#8593;',
self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '',
self::C_STR_CUSTOM_CSS => ''
// Custom CSS migrates to a dedicated tab:
self::C_STR_CUSTOM_CSS => '',
),
@ -694,7 +712,14 @@ class MCI_Footnotes_Settings {
self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => PHP_INT_MAX,
)
),
"footnotes_storage_custom_css" => array(
self::C_STR_CUSTOM_CSS_NEW => '',
self::C_BOOL_CUSTOM_CSS_MIGRATED => '',
),
);

View file

@ -8,7 +8,7 @@
*
* Since v2.1.4 of Footnotes
*
* Last modified: 2020-12-06T1722+0100
* Last modified for v2.2.2 2020-12-15T1004+0100
*
* The enqueuing of this style sheet is optional and can be
* enabled in the Reference container settings.
@ -20,56 +20,66 @@ 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-"])
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
Footnotes reference containers are near the bottom of main.
This style sheet lets Footnotes reference containers 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.
This is mainly useful with Hello Elementor but it helps fix
also other themes like Twenty Twenty-One.
*/
main, .main-content, .site-main {
margin-right: auto;
margin-left: auto;
main,
.main-content,
.site-main {
margin: 0 auto;
}
@media (max-width: 575px) {
main, .main-content, .site-main {
padding-right: 10px;
padding-left: 10px;
main,
.main-content,
.site-main {
padding: 0 10px;
}
}
@media (min-width: 576px) {
main, .main-content, .site-main {
main,
.main-content,
.site-main {
max-width: 500px;
}
}
@media (min-width: 768px) {
main, .main-content, .site-main {
main,
.main-content,
.site-main {
max-width: 600px;
}
}
@media (min-width: 992px) {
main, .main-content, .site-main {
main,
.main-content,
.site-main {
max-width: 800px;
}
}
@media (min-width: 1200px) {
main, .main-content, .site-main {
main,
.main-content,
.site-main {
max-width: 960px;
}
}

View file

@ -8,7 +8,7 @@
*
* Since v2.1.4 of Footnotes
*
* Last modified: 2020-12-06T1722+0100
* Last modified for v2.2.2 2020-12-15T1004+0100
*
* The enqueuing of this style sheet is optional and can be
* enabled in the Reference container settings.
@ -20,56 +20,60 @@ 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-"])
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
Footnotes reference containers are near the bottom of main.
This style sheet lets Footnotes reference containers 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.
This is mainly useful with Hello Elementor but it helps fix
also other themes like Twenty Twenty-One.
*/
div.page-content {
margin-right: auto;
margin-left: auto;
div.page-content,
div.entry-content {
margin: 0 auto;
}
@media (max-width: 575px) {
div.page-content {
padding-right: 10px;
padding-left: 10px;
div.page-content,
div.entry-content {
padding: 0 10px;
}
}
@media (min-width: 576px) {
div.page-content {
div.page-content,
div.entry-content {
max-width: 500px;
}
}
@media (min-width: 768px) {
div.page-content {
div.page-content,
div.entry-content {
max-width: 600px;
}
}
@media (min-width: 992px) {
div.page-content {
div.page-content,
div.entry-content {
max-width: 800px;
}
}
@media (min-width: 1200px) {
div.page-content {
div.page-content,
div.entry-content {
max-width: 960px;
}
}

View file

@ -8,7 +8,7 @@
*
* Since v2.1.4 of Footnotes
*
* Last modified: 2020-12-06T1722+0100
* Last modified for v2.2.2 2020-12-15T1046+0100
*
* The enqueuing of this style sheet is optional and can be
* enabled in the Reference container settings.
@ -20,56 +20,60 @@ 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-"])
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
Footnotes reference containers are near the bottom of main.
This style sheet lets Footnotes reference containers 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.
This is mainly useful with Hello Elementor but it helps fix
also other themes like Twenty Twenty-One.
*/
.footnotes_reference_container {
margin-right: auto;
margin-left: auto;
.entry-content div.footnotes_reference_container,
main div.footnotes_reference_container {
margin: 0 auto;
}
@media (max-width: 575px) {
.footnotes_reference_container {
padding-right: 10px;
padding-left: 10px;
.entry-content div.footnotes_reference_container,
main div.footnotes_reference_container {
padding: 0 10px;
}
}
@media (min-width: 576px) {
.footnotes_reference_container {
.entry-content div.footnotes_reference_container,
main div.footnotes_reference_container {
max-width: 500px;
}
}
@media (min-width: 768px) {
.footnotes_reference_container {
.entry-content div.footnotes_reference_container,
main div.footnotes_reference_container {
max-width: 600px;
}
}
@media (min-width: 992px) {
.footnotes_reference_container {
.entry-content div.footnotes_reference_container,
main div.footnotes_reference_container {
max-width: 800px;
}
}
@media (min-width: 1200px) {
.footnotes_reference_container {
.entry-content div.footnotes_reference_container,
main div.footnotes_reference_container {
max-width: 960px;
}
}

View file

@ -5,14 +5,14 @@
* Created-Time: 16:21
* Since: 1.0
*
* Version: 2.2.0
* Version: 2.2.2
*
* Classes added to public.css may be added to the
* list documenting CSS classes for Custom CSS if
* recommended for general use.
* List in templates/dashboard/customize-css.html
*
* Last modified: 2020-12-13T2059+0100
* Last modified: 2020-12-15T0844+0100
*/

View file

@ -5,9 +5,9 @@
* Created-Time: 16:21
* Since: 1.0
*
* Version: 2.2.0
* Version: 2.2.2
*
* Last modified: 2020-12-13T2127+0100
* Last modified: 2020-12-15T1020+0100
*/
@ -195,25 +195,28 @@ maintainability and readability of the source list.
The textarea has monospace font, but no other features
helping edit CSS, as tab support and syntactic colors.
*/
#customize_css tr td:first-child {
#customize_css_new tr td:first-child {
width: 44% !important;
font-weight: normal !important;
}
#customize_css tr td:first-child span:first-child {
#customize_css_new tr td:first-child span:first-child {
font-weight: bold !important;
}
#customize_css .list {
#customize_css_new .list {
padding-top: 10px;
}
#customize_css .list p {
#customize_css_new .list p {
font-family: monospace;
padding: 0 10px;
text-indent: -10px;
margin: .5em 0;
}
#footnote_inputfield_custom_css {
#footnote_inputfield_custom_css_new {
height: 500px;
}
#footnote_inputfield_custom_css,
#footnote_inputfield_custom_css_new {
width: 90%;
resize: both;
overflow: scroll;

View file

@ -4,12 +4,12 @@
Plugin URI: https://wordpress.org/plugins/footnotes/
Description: time to bring footnotes to your website! footnotes are known from offline publishing and everybody takes them for granted when reading a magazine.
Author: Mark Cheret
Version: 2.2.1
Version: 2.2.2
Author URI: http://cheret.de/plugins/footnotes-2/
Text Domain: footnotes
Domain Path: /languages
*/
define( 'FOOTNOTES_VERSION', '2.2.1' );
define( 'FOOTNOTES_VERSION', '2.2.2' );
/*
Copyright 2020 Mark Cheret (email: mark@cheret.de)

View file

@ -80,6 +80,11 @@ Visit this swift write-up from a **footnotes** user by the name of **Southwest**
== Changelog ==
= 2.2.2 =
- Bugfix: Dashboard: Link element setting only under General settings > Reference container
- Add: Dashboard: migrate Custom CSS to dedicated new tab, keep legacy until checking a box
- Bugfix: Reference container: edits to optional basic responsive page layout style sheets
= 2.2.1 =
- Bugfix: Dashboard: duplicate moved settings under their legacy tab to account for data structure

View file

@ -0,0 +1,15 @@
<div class="footnotes_description">
<p>[[description-css]]</p>
</div>
<table id="customize_css_migration" class="widefat fixed">
<tbody>
<tr>
<td>[[label-css]]</td>
<td>[[css]]</td>
</tr>
<tr>
<td>[[label-migrated]]</td>
<td>[[migrated]] <span class="footnotes_notice">[[notice-migrated]]</span></td>
</tr>
</tbody>
</table>

View file

@ -0,0 +1,30 @@
<table id="customize_css_new" class="widefat fixed">
<tbody>
<tr>
<td><span>[[headline]]</span><br />
<div class="list">
<p>.footnote_referrer = enclosing &lt;span>
<p>.footnote_plugin_tooltip_text = inner &lt;sup>, not tooltip
<p>
<p>.footnote_tooltip = inner &lt;span>
<p>.footnote_tooltip_continue = nested &lt;span>
<p>
<p>.footnotes_reference_container = enclosing &lt;div>
<p>.footnote_container_prepare = label &lt;div>
<p>.footnote_reference_container_label = &lt;span>
<p>.footnote_reference_container_collapse_button = sibling &lt;span>
<p>.footnotes_table = &lt;table>
<p>
<p>.footnote_plugin_index_combi = first &lt;td> if identical footnotes are combined
<p>.footnote_plugin_index = first &lt;td> if not
<p>.footnote_index = &lt;a> or &lt;span> in first &lt;td> in 3-column table
<p>.footnote_plugin_link = &lt;a> or &lt;span> if identical footnotes are not combined, or second &lt;td> in 3-column table
<p>.footnote_backlink = &lt;a> or &lt;span> if identical footnotes are combined, or in second &lt;td> in 3-column table
<p>.footnote_index_arrow = nested &lt;span>, symbol only
<p>.footnote_plugin_text = second &lt;td>, or third &lt;td> in 3-column table
</div>
</td>
<td>[[css]]</td>
</tr>
</tbody>
</table>

View file

@ -1,29 +1,10 @@
<div class="footnotes_description">
<p>[[description-css]]</p>
</div>
<table id="customize_css" class="widefat fixed">
<tbody>
<tr>
<td><span>[[headline]]</span><br />
<div class="list">
<p>.footnote_referrer = enclosing &lt;span>
<p>.footnote_plugin_tooltip_text = inner &lt;sup>, not tooltip
<p>
<p>.footnote_tooltip = inner &lt;span>
<p>.footnote_tooltip_continue = nested &lt;span>
<p>
<p>.footnotes_reference_container = enclosing &lt;div>
<p>.footnote_container_prepare = label &lt;div>
<p>.footnote_reference_container_label = &lt;span>
<p>.footnote_reference_container_collapse_button = sibling &lt;span>
<p>.footnotes_table = &lt;table>
<p>
<p>.footnote_plugin_index_combi = first &lt;td> if identical footnotes are combined
<p>.footnote_plugin_index = first &lt;td> if not
<p>.footnote_index = &lt;a> or &lt;span> in first &lt;td> in 3-column table
<p>.footnote_plugin_link = &lt;a> or &lt;span> if identical footnotes are not combined, or second &lt;td> in 3-column table
<p>.footnote_backlink = &lt;a> or &lt;span> if identical footnotes are combined, or in second &lt;td> in 3-column table
<p>.footnote_index_arrow = nested &lt;span>, symbol only
<p>.footnote_plugin_text = second &lt;td>, or third &lt;td> in 3-column table
</div>
</td>
<td>[[label-css]]</td>
<td>[[css]]</td>
</tr>
</tbody>

View file

@ -14,10 +14,7 @@
</tr>
<tr>
<td>[[label-link]]</td>
<td>[[link]] <span class="footnotes_notice">[[notice-link]]</span></td>
<td><span class="footnotes_notice">[[notice-link]]</span></td>
</tr>
</tbody>
</table>
<div class="footnotes_description">
<p>[[description-link]]</p>
</div>

View file

@ -8,14 +8,14 @@
<td>[[label-collapse]]</td>
<td>[[collapse]]</td>
</tr>
<tr>
<td>[[label-shortcode]]</td>
<td>[[shortcode]] <span class="footnotes_notice">[[notice-shortcode]]</span></td>
</tr>
<tr>
<td>[[label-position]]</td>
<td>[[position]] <span class="footnotes_notice">[[notice-position]]</span></td>
</tr>
<tr>
<td>[[label-shortcode]]</td>
<td>[[shortcode]] <span class="footnotes_notice">[[notice-shortcode]]</span></td>
</tr>
<tr>
<td>[[label-page-layout]]</td>
<td>[[page-layout]] <span class="footnotes_notice">[[notice-page-layout]]</span></td>
@ -96,3 +96,6 @@
</tr>
</tbody>
</table>
<div class="footnotes_description">
<p>[[description-link]]</p>
</div>