development 2.1.4d10 with 3 new stylesheets to fix layout in page, derived from Hello Elementor under GPLv3. Need to post on forum.
git-svn-id: https://plugins.svn.wordpress.org/footnotes/trunk@2431872 b8457f37-d9ea-0310-8a92-e5e31aec5664
This commit is contained in:
parent
bfd563f907
commit
c432dde37b
12 changed files with 298 additions and 32 deletions
|
@ -12,7 +12,7 @@
|
|||
* 2.1.1 options for ref container and alternative tooltips 2020-11-16T2152+0100
|
||||
* 2.1.4 settings for ref container and tooltips 2020-12-03T0950+0100
|
||||
*
|
||||
* Last modified: 2020-12-04T0206+0100
|
||||
* Last modified: 2020-12-04T2230+0100
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -123,6 +123,13 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
"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)
|
||||
);
|
||||
// basic responsive page layout options:
|
||||
$l_arr_PageLayoutOptions = array(
|
||||
"none" => __("Don’t fix the layout", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"container" => __("to the references container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"main" => __("from the post title to the references container", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
"body" => __("to the whole page", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)
|
||||
);
|
||||
// options for the separating punctuation between backlinks:
|
||||
// Unicode names are conventionally uppercase.
|
||||
$l_arr_Separators = array(
|
||||
|
@ -162,6 +169,13 @@ 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)),
|
||||
"collapse" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_COLLAPSE, $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)),
|
||||
"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),
|
||||
"page-layout-comment" => __("Most themes don’t need this fix.", MCI_Footnotes_Config::C_STR_PLUGIN_NAME),
|
||||
|
||||
"label-startpage" => $this->addLabel(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE, __("Display on start page too", MCI_Footnotes_Config::C_STR_PLUGIN_NAME)),
|
||||
"startpage" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_START_PAGE_ENABLE, $l_arr_Enabled),
|
||||
|
||||
|
@ -178,9 +192,6 @@ class MCI_Footnotes_Layout_Settings extends MCI_Footnotes_LayoutEngine {
|
|||
"3column" => $this->addSelectBox(MCI_Footnotes_Settings::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE, $l_arr_Enabled),
|
||||
"3column-comment" => __("This legacy layout is available if identical footnotes are not combined.", 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)),
|
||||
"position" => $this->addSelectBox(MCI_Footnotes_Settings::C_STR_REFERENCE_CONTAINER_POSITION, $l_arr_Positions),
|
||||
|
||||
"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),
|
||||
|
|
|
@ -12,8 +12,9 @@
|
|||
* 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 enqueue optionally an extra style sheet 2020-12-04T2231+0100
|
||||
*
|
||||
* Last modified: 2020-12-01T0146+0100
|
||||
* Last modified: 2020-12-04T2232+0100
|
||||
*/
|
||||
|
||||
|
||||
|
@ -132,8 +133,10 @@ class MCI_Footnotes {
|
|||
wp_enqueue_script( 'jquery-ui-position' );
|
||||
wp_enqueue_script( 'jquery-ui-tooltip' );
|
||||
|
||||
// enqueue jQuery Tools: redacted jQuery.browser, completed minification; added versioning 2020-11-18T2150+0100
|
||||
wp_enqueue_script('mci-footnotes-js-jquery-tools', plugins_url('../js/jquery.tools.min.js', __FILE__), '', '2.1.1');
|
||||
// enqueue jQuery Tools:
|
||||
// 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:
|
||||
|
@ -152,13 +155,16 @@ class MCI_Footnotes {
|
|||
|
||||
//### STYLES
|
||||
|
||||
// up-to-date plugin version number needed for cache busting:
|
||||
wp_enqueue_style(
|
||||
'mci-footnotes-css-public',
|
||||
plugins_url('../css/public.css', __FILE__),
|
||||
'',
|
||||
FOOTNOTES_VERSION
|
||||
);
|
||||
}
|
||||
|
||||
// up-to-date plugin version number needed for cache busting:
|
||||
// not use '-css' in the handle, is appended automatically;
|
||||
// constant FOOTNOTES_VERSION defined in footnotes.php, media all is default
|
||||
wp_enqueue_style( 'mci-footnotes-public', plugins_url('footnotes/css/public.css'), array(), FOOTNOTES_VERSION, 'all' );
|
||||
|
||||
// optional layout fix for unsupportive themes:
|
||||
// since 2.1.4 2020-12-04T2231+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-public-' . $l_str_LayoutOption, plugins_url('footnotes/css/public-' . $l_str_LayoutOption . '.css'), array(), FOOTNOTES_VERSION, 'all' );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
* 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-12-03T1603+0100
|
||||
* Last modified: 2020-12-04T2230+0100
|
||||
*/
|
||||
|
||||
|
||||
|
@ -436,6 +436,7 @@ class MCI_Footnotes_Settings {
|
|||
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";
|
||||
|
||||
const C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT = "footnotes_inputfield_page_layout_support";
|
||||
|
||||
|
||||
/**
|
||||
|
@ -478,6 +479,9 @@ class MCI_Footnotes_Settings {
|
|||
self::C_STR_REFERENCE_CONTAINER_POSITION => 'post_end',
|
||||
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_START_PAGE_ENABLE => 'yes',
|
||||
self::C_BOOL_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no',
|
||||
|
@ -505,7 +509,10 @@ class MCI_Footnotes_Settings {
|
|||
// 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',
|
||||
|
||||
// since removal of the_post hook, expert mode is no danger zone
|
||||
|
|
Reference in a new issue