2021-03-03 18:58:03 +00:00
|
|
|
|
<?php // phpcs:disable WordPress.Files.FileName.InvalidClassFileName
|
2021-03-02 03:09:34 +00:00
|
|
|
|
/**
|
|
|
|
|
* Includes the Settings class to handle all Plugin settings.
|
|
|
|
|
*
|
|
|
|
|
* @filesource
|
2021-03-03 18:58:03 +00:00
|
|
|
|
* @package footnotes
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @date 14.09.14 10:43
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* The constants are ordered by ascending version so their docblocks can replace most of this list.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
* @since 2.0.0 Update: **symbol for backlinks** removed; hyperlink moved to the reference number.
|
|
|
|
|
* @since 2.0.4 Update: Restore arrow settings to customize or disable the now prepended arrow symbol, thanks to @mmallett issue report.
|
|
|
|
|
* @since 2.0.7 BUGFIX: Hooks: Default-disable 'the_post', thanks to @spaceling @markcheret @nyamachi @whichgodsaves @spiralofhope2 @mmallett @andreasra @widecast @ymorin007 @tashi1es bug reports.
|
|
|
|
|
* @since 2.1.3 Bugfix: Hooks: disable the_excerpt hook by default to fix issues, thanks to @nikelaos bug report.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Loads the settings values, sets to default values if undefined.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
*/
|
|
|
|
|
class MCI_Footnotes_Settings {
|
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the label of the reference container.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_REFERENCE_CONTAINER_NAME = 'footnote_inputfield_references_label';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to collapse the reference container by default.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @var str
|
|
|
|
|
* The string is converted to Boolean false if 'no', true if 'yes'.
|
2021-03-03 18:58:03 +00:00
|
|
|
|
* @see MCI_Footnotes_Convert::to_bool()
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_REFERENCE_CONTAINER_COLLAPSE = 'footnote_inputfield_collapse_references';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the position of the reference container.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_REFERENCE_CONTAINER_POSITION = 'footnote_inputfield_reference_container_place';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for combining identical footnotes.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_COMBINE_IDENTICAL_FOOTNOTES = 'footnote_inputfield_combine_identical';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the short code of the footnote’s start.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_SHORT_CODE_START = 'footnote_inputfield_placeholder_start';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the short code of the footnote’s end.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_SHORT_CODE_END = 'footnote_inputfield_placeholder_end';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the user-defined short code of the footnotes start.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_SHORT_CODE_START_USER_DEFINED = 'footnote_inputfield_placeholder_start_user_defined';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the user-defined short code of the footnotes end.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_SHORT_CODE_END_USER_DEFINED = 'footnote_inputfield_placeholder_end_user_defined';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the counter style of the footnotes.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_COUNTER_STYLE = 'footnote_inputfield_counter_style';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the backlink symbol selection.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
2021-03-16 19:41:08 +00:00
|
|
|
|
*
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* - Update: Restore arrow settings to customize or disable the now prepended arrow symbol, thanks to @mmallett issue report.
|
2021-03-16 19:41:08 +00:00
|
|
|
|
*
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* @reporter @mmallett
|
|
|
|
|
* @link https://wordpress.org/support/topic/mouse-over-broken/#post-13593037
|
2021-03-24 21:19:07 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.0.4
|
|
|
|
|
* @date 2020-11-02T2115+0100
|
|
|
|
|
* @var str
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-15 20:03:16 +00:00
|
|
|
|
const C_STR_HYPERLINK_ARROW = 'footnote_inputfield_custom_hyperlink_symbol';
|
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the user-defined backlink symbol.
|
2021-03-15 20:03:16 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
|
|
|
|
const C_STR_HYPERLINK_ARROW_USER_DEFINED = 'footnote_inputfield_custom_hyperlink_symbol_user';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to look for footnotes in post excerpts.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-15 19:37:41 +00:00
|
|
|
|
* - Bugfix: Hooks: disable the_excerpt hook by default to fix issues, thanks to @nikelaos bug report.
|
2021-03-16 19:41:08 +00:00
|
|
|
|
*
|
2021-03-15 19:37:41 +00:00
|
|
|
|
* @reporter @nikelaos
|
|
|
|
|
* @link https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068
|
2021-03-24 21:19:07 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
2021-03-31 00:49:17 +00:00
|
|
|
|
* @since 2.6.2 Debug No option.
|
|
|
|
|
* @since 2.6.3 Enable by default after debugging both Yes and No options.
|
|
|
|
|
* @see C_STR_EXPERT_LOOKUP_THE_EXCERPT
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @var str
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_IN_EXCERPT = 'footnote_inputfield_search_in_excerpt';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the string before the footnote referrer.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @var str
|
|
|
|
|
*
|
2021-03-03 18:58:03 +00:00
|
|
|
|
* The default footnote referrer surroundings should be square brackets.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* - with respect to baseline footnote referrers new option;
|
|
|
|
|
* - as in English or US American typesetting;
|
|
|
|
|
* - for better UX thanks to a more button-like appearance;
|
|
|
|
|
* - for stylistic consistency with the expand-collapse button.
|
2021-03-24 21:19:07 +00:00
|
|
|
|
*
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_STYLING_BEFORE = 'footnote_inputfield_custom_styling_before';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the string after the footnote referrer.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_STYLING_AFTER = 'footnote_inputfield_custom_styling_after';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the Custom CSS.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* @since 1.5.0
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
2021-03-15 20:03:16 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.3.0 Adding: new settings tab for custom CSS settings.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-15 20:03:16 +00:00
|
|
|
|
const C_STR_CUSTOM_CSS = 'footnote_inputfield_custom_css';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the 'I love footnotes' text.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* @since 1.5.0
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
2021-03-15 20:03:16 +00:00
|
|
|
|
*/
|
|
|
|
|
const C_STR_FOOTNOTES_LOVE = 'footnote_inputfield_love';
|
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable the mouse-over box.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* @since 1.5.2
|
|
|
|
|
* @var str
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-15 20:03:16 +00:00
|
|
|
|
const C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED = 'footnote_inputfield_custom_mouse_over_box_enabled';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable tooltip truncation.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.4
|
|
|
|
|
* @var str
|
2021-03-24 21:19:07 +00:00
|
|
|
|
*
|
|
|
|
|
* The mouse over content truncation should be enabled by default
|
|
|
|
|
* to raise awareness of the functionality and to prevent the screen
|
|
|
|
|
* from being filled at mouse-over, and to allow the Continue reading.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED = 'footnote_inputfield_custom_mouse_over_box_excerpt_enabled';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the mouse-over box to define the max. length of the enabled excerpt.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.4
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @var int
|
|
|
|
|
*
|
|
|
|
|
* @since 2.0.7 Increase default truncation length from 150 to 200 chars.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH = 'footnote_inputfield_custom_mouse_over_box_excerpt_length';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable the 'the_title' hook.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* @since 1.5.5
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
2021-03-24 21:19:07 +00:00
|
|
|
|
*
|
|
|
|
|
* These are checkboxes; keyword 'checked' is converted to Boolean true,
|
|
|
|
|
* empty string to false (default).
|
|
|
|
|
*
|
|
|
|
|
* Hooks should all be enabled by default to prevent users from
|
|
|
|
|
* thinking at first that the feature is broken in post titles.
|
|
|
|
|
* @link https://wordpress.org/support/topic/more-feature-ideas/
|
|
|
|
|
*
|
|
|
|
|
* Yet in titles, footnotes are still buggy, because WordPress
|
|
|
|
|
* uses the title string in menus and in the title element, but
|
|
|
|
|
* Footnotes doesn’t delete footnotes therein.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-15 20:03:16 +00:00
|
|
|
|
const C_STR_EXPERT_LOOKUP_THE_TITLE = 'footnote_inputfield_expert_lookup_the_title';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable the 'the_content' hook.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* @since 1.5.5
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-15 20:03:16 +00:00
|
|
|
|
const C_STR_EXPERT_LOOKUP_THE_CONTENT = 'footnote_inputfield_expert_lookup_the_content';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable the 'the_excerpt' hook.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* @since 1.5.5
|
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* - Bugfix: Hooks: disable the_excerpt hook by default to fix issues, thanks to @nikelaos bug report.
|
|
|
|
|
*
|
|
|
|
|
* @reporter @nikelaos
|
|
|
|
|
* @link https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068
|
|
|
|
|
* @link https://wordpress.org/support/topic/jquery-comes-up-in-feed-content/#post-13110879
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* @link https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13687068
|
2021-03-24 21:19:07 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.3
|
2021-03-31 00:49:17 +00:00
|
|
|
|
* @since 2.6.3 Enable by default after debugging the 'Footnotes in excerpts' setting.
|
|
|
|
|
* @see C_STR_FOOTNOTES_IN_EXCERPT
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @var str
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-15 20:03:16 +00:00
|
|
|
|
const C_STR_EXPERT_LOOKUP_THE_EXCERPT = 'footnote_inputfield_expert_lookup_the_excerpt';
|
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable the 'widget_title' hook.
|
2021-03-15 20:03:16 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.5
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
|
|
|
|
const C_STR_EXPERT_LOOKUP_WIDGET_TITLE = 'footnote_inputfield_expert_lookup_widget_title';
|
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable the 'widget_text' hook.
|
2021-03-15 20:03:16 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.5
|
|
|
|
|
* @var str
|
2021-03-24 21:19:07 +00:00
|
|
|
|
*
|
|
|
|
|
* The widget_text hook must be disabled by default, because it causes
|
|
|
|
|
* multiple reference containers to appear in Elementor accordions, but
|
|
|
|
|
* it must be enabled if multiple reference containers are desired, as
|
|
|
|
|
* in Elementor toggles.
|
2021-03-15 20:03:16 +00:00
|
|
|
|
*/
|
|
|
|
|
const C_STR_EXPERT_LOOKUP_WIDGET_TEXT = 'footnote_inputfield_expert_lookup_widget_text';
|
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the Expert mode.
|
2021-03-15 20:03:16 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.5
|
|
|
|
|
* @var str
|
|
|
|
|
*
|
|
|
|
|
* @since 2.1.6 This setting removed as irrelevant since priority level settings need permanent visibility.
|
|
|
|
|
* @date 2020-12-09T2107+0100
|
|
|
|
|
*
|
|
|
|
|
* Since the removal of the the_post hook, the tab is no danger zone any longer.
|
|
|
|
|
* All users, not experts only, need to be able to control relative positioning.
|
|
|
|
|
* @date 2020-11-06T1342+0100
|
|
|
|
|
*/
|
|
|
|
|
const C_STR_FOOTNOTES_EXPERT_MODE = 'footnote_inputfield_enable_expert_mode';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the mouse-over box to define the color.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.6
|
2021-03-27 06:10:08 +00:00
|
|
|
|
*
|
|
|
|
|
* - Bugfix: Tooltips: Styling: Font color: set to black for maximum contrast with respect to white default background, thanks to 4msc bug report.
|
|
|
|
|
*
|
|
|
|
|
* @reporter @4msc
|
|
|
|
|
* @link https://wordpress.org/support/topic/tooltip-not-showing-on-dark-theme-with-white-text/
|
|
|
|
|
*
|
|
|
|
|
* @since 2.6.1
|
|
|
|
|
* @see C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR = 'footnote_inputfield_custom_mouse_over_box_color';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the mouse-over box to define the background color.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.6
|
2021-03-27 06:10:08 +00:00
|
|
|
|
* @since 1.2.5..1.5.5 #fff7a7 hard-coded.
|
|
|
|
|
* @since 1.5.6..2.0.6 #fff7a7 setting default.
|
|
|
|
|
* The mouse over box shouldn’t feature a colored background.
|
|
|
|
|
* By default, due to diverging user preferences. White is neutral.
|
|
|
|
|
* @since 2.0.7..2.5.10 #ffffff setting default.
|
2021-03-15 20:03:16 +00:00
|
|
|
|
*
|
2021-03-16 19:41:08 +00:00
|
|
|
|
* - Bugfix: Tooltips: Styling: Background color: empty default value to adopt theme background, thanks to 4msc bug report.
|
|
|
|
|
*
|
|
|
|
|
* @reporter @4msc
|
|
|
|
|
* @link https://wordpress.org/support/topic/tooltip-not-showing-on-dark-theme-with-white-text/
|
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @since 2.5.11
|
2021-03-16 19:41:08 +00:00
|
|
|
|
* Theme default background color is best.
|
2021-03-27 06:10:08 +00:00
|
|
|
|
* But theme default background color doesn’t seem to exist.
|
|
|
|
|
* @link https://wordpress.org/support/topic/problem-with-footnotes-in-excerpts-of-the-blog-page/#post-14241849
|
|
|
|
|
* @since 2.6.1 default #ffffff again along with #000000 as font color.
|
|
|
|
|
* @see C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @var str
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND = 'footnote_inputfield_custom_mouse_over_box_background';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the mouse-over box to define the border width.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.6
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @var int
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH = 'footnote_inputfield_custom_mouse_over_box_border_width';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the mouse-over box to define the border color.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.6
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR = 'footnote_inputfield_custom_mouse_over_box_border_color';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the mouse-over box to define the border radius.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.6
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @var int
|
|
|
|
|
*
|
|
|
|
|
* @since 2.0.7 The mouse over box corners mustn’t be rounded as that is outdated.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS = 'footnote_inputfield_custom_mouse_over_box_border_radius';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the mouse-over box to define the max. width.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.6
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @var int
|
|
|
|
|
*
|
|
|
|
|
* @since 2.0.7 Set default width 450.
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* The width should be limited to start with, for the box to have shape.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH = 'footnote_inputfield_custom_mouse_over_box_max_width';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the mouse-over box to define the position.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* @since 1.5.7
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
2021-03-24 21:19:07 +00:00
|
|
|
|
*
|
|
|
|
|
* The default position should not be lateral because of the risk
|
|
|
|
|
* the box gets squeezed between note anchor at line end and window edge,
|
|
|
|
|
* and top because reading at the bottom of the window is more likely.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-15 20:03:16 +00:00
|
|
|
|
const C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION = 'footnote_inputfield_custom_mouse_over_box_position';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the mouse-over box to define the offset (x).
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* @since 1.5.7
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @var int
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-15 20:03:16 +00:00
|
|
|
|
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X = 'footnote_inputfield_custom_mouse_over_box_offset_x';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the mouse-over box to define the offset (y).
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* @since 1.5.7
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @var int
|
|
|
|
|
*
|
|
|
|
|
* The vertical offset must be negative for the box not to cover
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* The current line of text (web coordinates origin is top left).
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-15 20:03:16 +00:00
|
|
|
|
const C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y = 'footnote_inputfield_custom_mouse_over_box_offset_y';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the mouse-over box to define the box-shadow color.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* @since 1.5.8
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-15 20:03:16 +00:00
|
|
|
|
const C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR = 'footnote_inputfield_custom_mouse_over_box_shadow_color';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the label of the Read-on button in truncated tooltips.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* - Adding: Tooltips: Read-on button: Label: configurable instead of localizable, thanks to @rovanov example provision.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* @reporter @rovanov
|
|
|
|
|
* @link https://wordpress.org/support/topic/offset-x-axis-and-offset-y-axis-does-not-working/
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @since 2.1.0
|
|
|
|
|
* @date 2020-11-08T2106+0100
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-15 20:03:16 +00:00
|
|
|
|
const C_STR_FOOTNOTES_TOOLTIP_READON_LABEL = 'footnote_inputfield_readon_label';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable the alternative tooltips.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* - Bugfix: Tooltips: optional alternative JS implementation with CSS transitions to fix configuration-related outage, thanks to @andreasra feedback.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* @reporter @andreasra
|
|
|
|
|
* @link https://wordpress.org/support/topic/footnotes-appearing-in-header/page/2/#post-13632566
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @since 2.1.1
|
|
|
|
|
* @date 2020-11-11T1817+0100
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
|
|
|
|
*
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* These alternative tooltips work around a website related jQuery UI
|
|
|
|
|
* outage. They are low-script but use the AMP incompatible onmouseover
|
|
|
|
|
* and onmouseout arguments, along with CSS transitions for fade-in/out.
|
|
|
|
|
* The very small script is inserted after Footnotes’ internal stylesheet.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-15 20:03:16 +00:00
|
|
|
|
const C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE = 'footnote_inputfield_custom_mouse_over_box_alternative';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the referrer element.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* - Bugfix: Referrers: new setting for vertical align: superscript (default) or baseline (optional), thanks to @cwbayer bug report.
|
|
|
|
|
*
|
|
|
|
|
* @reporter @cwbayer
|
|
|
|
|
* @link https://wordpress.org/support/topic/footnote-number-in-text-superscript-disrupts-leading/
|
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @since 2.1.1
|
|
|
|
|
* @date 2020-11-16T0859+0100
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS = 'footnotes_inputfield_referrer_superscript_tags';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable the display of a backlink symbol.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* - Bugfix: Reference container: Backlink symbol: make optional, not suggest configuring it to invisible, thanks to @spaceling feedback.
|
|
|
|
|
*
|
|
|
|
|
* @reporter @spaceling
|
|
|
|
|
* @link https://wordpress.org/support/topic/change-the-position-5/page/2/#post-13671138
|
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @since 2.1.1
|
|
|
|
|
* @date 2020-11-16T2021+0100
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE = 'footnotes_inputfield_reference_container_backlink_symbol_enable';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to not display the reference container on the homepage.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* - Bugfix: Reference container: fix start pages by making its display optional, thanks to @dragon013 bug report.
|
|
|
|
|
*
|
|
|
|
|
* @reporter @dragon013
|
|
|
|
|
* @link https://wordpress.org/support/topic/possible-to-hide-it-from-start-page/
|
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @since 2.1.1
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE = 'footnotes_inputfield_reference_container_start_page_enable';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable the legacy layout of the reference container.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* - Bugfix: Reference container: option to restore pre-2.0.0 layout with the backlink symbol in an extra column.
|
|
|
|
|
*
|
|
|
|
|
* @since 2.1.1
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE = 'footnotes_inputfield_reference_container_3column_layout_enable';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to get the backlink symbol switch side.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* - Bugfix: Reference container: option to append symbol (prepended by default), thanks to @spaceling code contribution.
|
|
|
|
|
*
|
|
|
|
|
* @contributor @spaceling
|
|
|
|
|
* @link https://wordpress.org/support/topic/change-the-position-5/#post-13615994
|
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @since 2.1.1
|
|
|
|
|
* @date 2020-11-16T2024+0100
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH = 'footnotes_inputfield_reference_container_backlink_symbol_switch';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for 'the_content' hook priority level.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* - Bugfix: Reference container: fix relative position through priority level, thanks to @june01 @imeson @spaceling bug reports, thanks to @spaceling code contribution.
|
|
|
|
|
*
|
|
|
|
|
* @contributor @spaceling
|
|
|
|
|
* @link https://wordpress.org/support/topic/change-the-position-5/#post-13608594
|
|
|
|
|
*
|
|
|
|
|
* @reporter @june01
|
|
|
|
|
* @link https://wordpress.org/support/topic/change-the-position-5/
|
|
|
|
|
*
|
|
|
|
|
* @reporter @imeson
|
|
|
|
|
* @link https://wordpress.org/support/topic/change-the-position-5/#post-13538345
|
|
|
|
|
*
|
|
|
|
|
* @since 2.0.5
|
|
|
|
|
* @date 2020-11-02T0330+0100
|
|
|
|
|
* @link https://codex.wordpress.org/Plugin_API/#Hook_in_your_Filter
|
|
|
|
|
*
|
|
|
|
|
* - Bugfix: Dashboard: priority level setting for the_content hook, thanks to @imeson bug report.
|
|
|
|
|
*
|
|
|
|
|
* @reporter @imeson
|
|
|
|
|
* @link https://wordpress.org/support/topic/change-the-position-5/#post-13538345
|
|
|
|
|
*
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @since 2.1.1
|
|
|
|
|
* @date 2020-11-16T0859+0100
|
2021-03-27 06:10:08 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* - Bugfix: Priority levels: set the_content priority level to 98 to prevent plugin conflict, thanks to @marthalindeman bug report.
|
2021-03-27 06:10:08 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @reporter @marthalindeman
|
|
|
|
|
* @link https://wordpress.org/support/topic/code-showing-up-in-references/
|
2021-03-27 06:10:08 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @since 2.1.6
|
|
|
|
|
* @date 2020-12-10T0447+0100
|
2021-03-27 06:10:08 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* Priority level of the_content and of widget_text as the only relevant
|
|
|
|
|
* hooks must be less than 99 because social buttons may yield scripts
|
|
|
|
|
* that contain the strings '((' and '))', i.e. the default footnote
|
|
|
|
|
* start and end short codes, causing issues with fake footnotes.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* Setting the_content priority to 10 instead of PHP_INT_MAX i.e. 9223372036854775807
|
|
|
|
|
* makes the footnotes reference container display beneath the post and above other
|
|
|
|
|
* features added by other plugins, e.g. related post lists and social buttons.
|
|
|
|
|
*
|
|
|
|
|
* For YARPP to display related posts below the Footnotes reference container,
|
|
|
|
|
* priority needs to be at least 1200 (i.e. 0 =< $l_int_the_content_priority =< 1200).
|
|
|
|
|
*
|
|
|
|
|
* PHP_INT_MAX cannot be reset by leaving the number box empty. because browsers
|
|
|
|
|
* (WebKit) don’t allow it, so we must resort to -1.
|
|
|
|
|
* @link https://github.com/Modernizr/Modernizr/issues/171
|
|
|
|
|
* @var int
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_the_content_priority_level';
|
2021-03-27 06:10:08 +00:00
|
|
|
|
|
2021-03-02 03:09:34 +00:00
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for 'the_title' hook priority level.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* - Bugfix: Dashboard: priority level settings for all other hooks, thanks to @nikelaos bug report.
|
|
|
|
|
*
|
|
|
|
|
* @reporter @nikelaos
|
|
|
|
|
* @link https://wordpress.org/support/topic/doesnt-work-any-more-11/#post-13676705
|
|
|
|
|
*
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @since 2.1.2
|
|
|
|
|
* @date 2020-11-20T0620+0100
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @var int
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_the_title_priority_level';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for 'widget_title' hook priority level.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.2
|
|
|
|
|
* @date 2020-11-20T0620+0100
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @var int
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_widget_title_priority_level';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for 'widget_text' hook priority level.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.2
|
|
|
|
|
* @date 2020-11-20T0620+0100
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @var int
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_widget_text_priority_level';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for 'the_excerpt' hook priority level.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-15 19:37:41 +00:00
|
|
|
|
* @since 2.1.2
|
|
|
|
|
* @date 2020-11-20T0620+0100
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @var int
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-15 19:37:41 +00:00
|
|
|
|
const C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL = 'footnote_inputfield_expert_lookup_the_excerpt_priority_level';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the link element option.
|
2021-03-27 06:10:08 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* - Bugfix: Referrers and backlinks: Styling: make link elements optional to fix issues, thanks to @docteurfitness issue report and code contribution.
|
2021-03-27 06:10:08 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @contributor @docteurfitness
|
|
|
|
|
* @link https://wordpress.org/support/topic/update-2-1-3/#post-13704194
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_LINK_ELEMENT_ENABLED = 'footnote_inputfield_link_element_enabled';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable the presence of a backlink separator.
|
2021-03-27 06:10:08 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* - Bugfix: Reference container: make separating and terminating punctuation optional and configurable, thanks to @docteurfitness issue report and code contribution.
|
2021-03-27 06:10:08 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @contributor @docteurfitness
|
|
|
|
|
* @link https://wordpress.org/support/topic/update-2-1-3/#post-13704194
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
|
|
|
|
* @var str
|
2021-03-24 21:19:07 +00:00
|
|
|
|
*
|
|
|
|
|
* Backlink separators and terminators are often not preferred.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
* But a choice must be provided along with the ability to customize.
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_BACKLINKS_SEPARATOR_ENABLED = 'footnotes_inputfield_backlinks_separator_enabled';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the backlink separator options.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_BACKLINKS_SEPARATOR_OPTION = 'footnotes_inputfield_backlinks_separator_option';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for a custom backlink separator.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_BACKLINKS_SEPARATOR_CUSTOM = 'footnotes_inputfield_backlinks_separator_custom';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable the presence of a backlink terminator.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_BACKLINKS_TERMINATOR_ENABLED = 'footnotes_inputfield_backlinks_terminator_enabled';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the backlink terminator options.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_BACKLINKS_TERMINATOR_OPTION = 'footnotes_inputfield_backlinks_terminator_option';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for a custom backlink terminator.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @var str
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_BACKLINKS_TERMINATOR_CUSTOM = 'footnotes_inputfield_backlinks_terminator_custom';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable the backlinks column width.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @var str
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED = 'footnotes_inputfield_backlinks_column_width_enabled';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the backlinks column width scalar.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @var int
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_width_scalar';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the backlinks column width unit.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @var str
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_BACKLINKS_COLUMN_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_width_unit';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable a max width for the backlinks column.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @var str
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED = 'footnotes_inputfield_backlinks_column_max_width_enabled';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the backlinks column max width scalar.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @var int
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR = 'footnotes_inputfield_backlinks_column_max_width_scalar';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the backlinks column max width unit.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @var str
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT = 'footnotes_inputfield_backlinks_column_max_width_unit';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable line breaks between backlinks.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @var str
|
2021-03-15 19:37:41 +00:00
|
|
|
|
* Whether a <br /> tag is inserted.
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_BACKLINKS_LINE_BREAKS_ENABLED = 'footnotes_inputfield_backlinks_line_breaks_enabled';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable setting the tooltip font size.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @date 2020-12-04T1023+0100.
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @var str
|
2021-03-24 21:19:07 +00:00
|
|
|
|
*
|
|
|
|
|
* 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,
|
2021-03-15 19:37:41 +00:00
|
|
|
|
* Called mouse over box not tooltip for consistency.
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_MOUSE_OVER_BOX_FONT_SIZE_ENABLED = 'footnotes_inputfield_mouse_over_box_font_size_enabled';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the scalar value of the tooltip font size.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @var flo
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_FLO_MOUSE_OVER_BOX_FONT_SIZE_SCALAR = 'footnotes_inputfield_mouse_over_box_font_size_scalar';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the unit of the tooltip font size.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @var str
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_MOUSE_OVER_BOX_FONT_SIZE_UNIT = 'footnotes_inputfield_mouse_over_box_font_size_unit';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for basic responsive page layout support options.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @var str
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* Whether to concatenate an additional stylesheet.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT = 'footnotes_inputfield_page_layout_support';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for scroll offset.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* - Bugfix: Scroll offset: make configurable to fix site-dependent issues related to fixed headers.
|
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
|
|
|
|
* @date 2020-12-05T0538+0100
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @var int
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_FOOTNOTES_SCROLL_OFFSET = 'footnotes_inputfield_scroll_offset';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for scroll duration.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* - Bugfix: Scroll duration: make configurable to conform to website content and style requirements.
|
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
|
|
|
|
* @date 2020-12-05T0538+0100
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @var int
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_FOOTNOTES_SCROLL_DURATION = 'footnotes_inputfield_scroll_duration';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for tooltip display fade-in delay.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
|
|
|
|
* @date 2020-12-05T0538+0100
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @var int
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_MOUSE_OVER_BOX_FADE_IN_DELAY = 'footnotes_inputfield_mouse_over_box_fade_in_delay';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for tooltip display fade-in duration.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
|
|
|
|
* @date 2020-12-05T0538+0100
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @var int
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_MOUSE_OVER_BOX_FADE_IN_DURATION = 'footnotes_inputfield_mouse_over_box_fade_in_duration';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for tooltip display fade-out delay.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
|
|
|
|
* @date 2020-12-05T0538+0100
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @var int
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_MOUSE_OVER_BOX_FADE_OUT_DELAY = 'footnotes_inputfield_mouse_over_box_fade_out_delay';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for tooltip display fade-out duration.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.1.4
|
|
|
|
|
* @date 2020-12-05T0538+0100
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @var int
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_MOUSE_OVER_BOX_FADE_OUT_DURATION = 'footnotes_inputfield_mouse_over_box_fade_out_duration';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for URL wrap option.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* This is made optional because it causes weird line breaks.
|
|
|
|
|
* Unicode-compliant browsers break URLs at slashes.
|
|
|
|
|
*
|
|
|
|
|
* @since 2.1.6
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @date 2020-12-09T1606+0100
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTE_URL_WRAP_ENABLED = 'footnote_inputfield_url_wrap_enabled';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for reference container position shortcode.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* - Adding: Reference container: support for custom position shortcode, thanks to @hamshe issue report.
|
2021-03-27 06:10:08 +00:00
|
|
|
|
*
|
|
|
|
|
* @reporter @hamshe
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @link https://wordpress.org/support/topic/reference-container-in-elementor/
|
|
|
|
|
*
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @since 2.2.0
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @date 2020-12-13T2056+0100
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE = 'footnote_inputfield_reference_container_position_shortcode';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 20:03:16 +00:00
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the Custom CSS migrated to a dedicated tab.
|
2021-03-15 20:03:16 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* - Update: Dashboard: Custom CSS: unearth text area and migrate to dedicated tab as designed.
|
2021-03-27 06:10:08 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.2.2
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* @date 2020-12-15T0520+0100
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
|
|
|
|
const C_STR_CUSTOM_CSS_NEW = 'footnote_inputfield_custom_css_new';
|
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable display of legacy Custom CSS metaboxes.
|
2021-03-15 20:03:16 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.2.2
|
|
|
|
|
* @date 2020-12-15T0520+0100
|
|
|
|
|
* @var str
|
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* - Bugfix: Dashboard: Custom CSS: swap migration Boolean, meaning 'show legacy' instead of 'migration complete', due to storage data structure constraints.
|
2021-03-27 06:10:08 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @since 2.3.0
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* @date 2020-12-27T1233+0100
|
|
|
|
|
*
|
|
|
|
|
* The Boolean must be false if its setting is contained in the container to be hidden,
|
|
|
|
|
* because when saving, all missing constants are emptied, and to_bool() converts empty to false.
|
|
|
|
|
*/
|
|
|
|
|
const C_STR_CUSTOM_CSS_LEGACY_ENABLE = 'footnote_inputfield_custom_css_legacy_enable';
|
|
|
|
|
|
2021-03-02 03:09:34 +00:00
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for alternative tooltip position.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.2.5
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @date 2020-12-17T0746+0100
|
|
|
|
|
* @var str
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-15 19:37:41 +00:00
|
|
|
|
* Fixed width is for alternative tooltips, cannot reuse max-width nor offsets.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION = 'footnotes_inputfield_alternative_mouse_over_box_position';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for alternative tooltip x offset.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.2.5
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @date 2020-12-17T0746+0100
|
2021-03-15 19:37:41 +00:00
|
|
|
|
* @var int
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X = 'footnotes_inputfield_alternative_mouse_over_box_offset_x';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for alternative tooltip y offset.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.2.5
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @date 2020-12-17T0746+0100
|
2021-03-15 19:37:41 +00:00
|
|
|
|
* @var int
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y = 'footnotes_inputfield_alternative_mouse_over_box_offset_y';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for alternative tooltip width.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.2.5
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @date 2020-12-17T0746+0100
|
2021-03-15 19:37:41 +00:00
|
|
|
|
* @var int
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH = 'footnotes_inputfield_alternative_mouse_over_box_width';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for the reference container label element.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* - Bugfix: Reference container: Label: option to select paragraph or heading element, thanks to @markhillyer issue report.
|
|
|
|
|
*
|
|
|
|
|
* @reporter @markhillyer
|
2021-03-15 19:37:41 +00:00
|
|
|
|
* @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/
|
|
|
|
|
*
|
|
|
|
|
* @since 2.2.5
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @date 2020-12-18T1509+0100
|
|
|
|
|
* @var str
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT = 'footnotes_inputfield_reference_container_label_element';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable the reference container label bottom border.
|
|
|
|
|
*
|
|
|
|
|
* - Bugfix: Reference container: Label: make bottom border an option, thanks to @markhillyer issue report.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @reporter @markhillyer
|
2021-03-15 19:37:41 +00:00
|
|
|
|
* @link https://wordpress.org/support/topic/how-do-i-eliminate-the-horizontal-line-beneath-the-reference-container-heading/
|
|
|
|
|
*
|
|
|
|
|
* @since 2.2.5
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @date 2020-12-18T1509+0100
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @var str
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER = 'footnotes_inputfield_reference_container_label_bottom_border';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable reference container table row borders.
|
|
|
|
|
*
|
|
|
|
|
* - Bugfix: Reference container: add option for table borders to restore pre-2.0.0 design, thanks to @noobishh issue report.
|
2021-03-03 18:58:03 +00:00
|
|
|
|
*
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @reporter @noobishh
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @link https://wordpress.org/support/topic/borders-25/
|
|
|
|
|
*
|
|
|
|
|
* @since 2.2.10
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @date 2020-12-25T2311+0100
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE = 'footnotes_inputfield_reference_container_row_borders_enable';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for reference container top margin.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* - Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @reporter @hamshe
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13786635
|
2021-03-20 20:48:54 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.3.0
|
|
|
|
|
* @date 2020-12-29T0914+0100
|
|
|
|
|
* @var int
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_REFERENCE_CONTAINER_TOP_MARGIN = 'footnotes_inputfield_reference_container_top_margin';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key for reference container bottom margin.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* - Bugfix: Reference container: convert top padding to margin and make it a setting, thanks to @hamshe bug report.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @reporter @hamshe
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* @link https://wordpress.org/support/topic/reference-container-in-elementor/#post-13786635
|
2021-03-20 20:48:54 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.3.0
|
|
|
|
|
* @date 2020-12-29T0914+0100
|
|
|
|
|
* @var int
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN = 'footnotes_inputfield_reference_container_bottom_margin';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* Settings container key to enable hard links.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* - Adding: Referrers and backlinks: optional hard links for AMP compatibility, thanks to @psykonevro issue report, thanks to @martinneumannat issue report and code contribution.
|
|
|
|
|
*
|
|
|
|
|
* @contributor @martinneumannat
|
|
|
|
|
* @link https://wordpress.org/support/topic/making-it-amp-compatible/
|
|
|
|
|
*
|
|
|
|
|
* @reporter @psykonevro
|
|
|
|
|
* @link https://wordpress.org/support/topic/footnotes-is-not-amp-compatible/
|
|
|
|
|
*
|
2021-03-15 19:37:41 +00:00
|
|
|
|
* @since 2.3.0
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @date 2020-12-29T0914+0100
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @var str
|
2021-03-27 06:10:08 +00:00
|
|
|
|
*
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* When the alternative reference container is enabled, hard links are too.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_HARD_LINKS_ENABLE = 'footnotes_inputfield_hard_links_enable';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* Settings container key for the fragment ID slug in referrers.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.3.0
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @date 2020-12-29T0914+0100
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @var str
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_REFERRER_FRAGMENT_ID_SLUG = 'footnotes_inputfield_referrer_fragment_id_slug';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* Settings container key for the fragment ID slug in footnotes.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.3.0
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @date 2020-12-29T0914+0100
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @var str
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTE_FRAGMENT_ID_SLUG = 'footnotes_inputfield_footnote_fragment_id_slug';
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* Settings container key for the ID separator in fragment IDs.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.3.0
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @date 2020-12-29T0914+0100
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @var str
|
2021-03-15 19:37:41 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_HARD_LINK_IDS_SEPARATOR = 'footnotes_inputfield_hard_link_ids_separator';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-24 21:19:07 +00:00
|
|
|
|
* Settings container key to enable shortcode syntax validation.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 2.4.0
|
|
|
|
|
* @date 2021-01-01T0616+0100
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE = 'footnotes_inputfield_shortcode_syntax_validation_enable';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Settings container key to enable backlink tooltips.
|
|
|
|
|
*
|
|
|
|
|
* - Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report.
|
|
|
|
|
*
|
|
|
|
|
* @reporter @theroninjedi47
|
|
|
|
|
* @link https://wordpress.org/support/topic/hyperlinked-footnotes-creating-excessive-back-history/
|
|
|
|
|
*
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @since 2.5.4
|
|
|
|
|
* @var str
|
|
|
|
|
*
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* When hard links are enabled, clicks on the backlinks are logged in the browsing history,
|
|
|
|
|
* along with clicks on the referrers.
|
|
|
|
|
* This tooltip hints to use the backbutton instead, so the history gets streamlined again.
|
|
|
|
|
* @link https://wordpress.org/support/topic/making-it-amp-compatible/#post-13837359
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE = 'footnotes_inputfield_backlink_tooltip_enable';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Settings container key to configure the backlink tooltip.
|
|
|
|
|
*
|
|
|
|
|
* - Update: Reference container: Hard backlinks (optional): optional configurable tooltip hinting to use the backbutton instead, thanks to @theroninjedi47 bug report.
|
|
|
|
|
*
|
|
|
|
|
* @reporter @theroninjedi47
|
|
|
|
|
* @link https://wordpress.org/support/topic/hyperlinked-footnotes-creating-excessive-back-history/
|
|
|
|
|
*
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @since 2.5.4
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT = 'footnotes_inputfield_backlink_tooltip_text';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Settings container key to configure the tooltip excerpt delimiter.
|
|
|
|
|
*
|
|
|
|
|
* - Update: Tooltips: ability to display dedicated content before `[[/tooltip]]`, thanks to @jbj2199 issue report.
|
|
|
|
|
*
|
|
|
|
|
* The first implementation used a fixed shortcode provided in the changelog.
|
|
|
|
|
* But Footnotes’ UI design policy is to make shortcodes freely configurable.
|
2021-03-03 18:58:03 +00:00
|
|
|
|
*
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @reporter @jbj2199
|
|
|
|
|
* @link https://wordpress.org/support/topic/change-tooltip-text/
|
|
|
|
|
*
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @since 2.5.4
|
|
|
|
|
* @var str
|
|
|
|
|
*
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* Tooltips can display another content than the footnote entry
|
|
|
|
|
* in the reference container. The trigger is a shortcode in
|
|
|
|
|
* the footnote text separating the tooltip text from the note.
|
|
|
|
|
* That is consistent with what WordPress does for excerpts.
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER = 'footnotes_inputfield_tooltip_excerpt_delimiter';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Settings container key to enable mirroring the tooltip excerpt in the reference container.
|
|
|
|
|
*
|
|
|
|
|
* @since 2.5.4
|
|
|
|
|
* @var str
|
|
|
|
|
*
|
|
|
|
|
* Tooltips, even jQuery-driven, may be hard to consult on mobiles.
|
|
|
|
|
* This option allows to read the tooltip content in the reference container too.
|
|
|
|
|
* @link https://wordpress.org/support/topic/change-tooltip-text/#post-13935050
|
|
|
|
|
* But this must not be the default behavior.
|
|
|
|
|
* @link https://wordpress.org/support/topic/change-tooltip-text/#post-13935488
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE = 'footnotes_inputfield_tooltip_excerpt_mirror_enable';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Settings container key to configure the tooltip excerpt separator in the reference container.
|
|
|
|
|
*
|
|
|
|
|
* @since 2.5.4
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR = 'footnotes_inputfield_tooltip_excerpt_mirror_separator';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Settings container key to enable superscript style normalization.
|
|
|
|
|
*
|
|
|
|
|
* -Bugfix: Referrers: optional fixes to vertical alignment, font size and position (static) for in-theme consistency and cross-theme stability, thanks to @tomturowski bug report.
|
|
|
|
|
*
|
|
|
|
|
* @reporter @tomturowski
|
|
|
|
|
* @link https://wordpress.org/support/topic/in-line-superscript-ref-rides-to-high/
|
|
|
|
|
*
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @since 2.5.4
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT = 'footnotes_inputfield_referrers_normal_superscript';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Settings container key to select the script mode for the reference container.
|
|
|
|
|
*
|
|
|
|
|
* - Bugfix: Reference container: optional alternative expanding and collapsing without jQuery for use with hard links, thanks to @hopper87it @pkverma99 issue reports.
|
|
|
|
|
*
|
|
|
|
|
* @reporter @hopper87it
|
|
|
|
|
* @link https://wordpress.org/support/topic/footnotes-wp-rocket/
|
|
|
|
|
*
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @since 2.5.6
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @var str
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
const C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE = 'footnotes_inputfield_reference_container_script_mode';
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-16 19:41:08 +00:00
|
|
|
|
/**
|
|
|
|
|
* Settings container key to enable AMP compatibility mode.
|
|
|
|
|
*
|
2021-03-18 10:53:57 +00:00
|
|
|
|
* - Adding: Tooltips: make display work purely by style rules for AMP compatibility, thanks to @milindmore22 code contribution.
|
|
|
|
|
* - Bugfix: Tooltips: enable accessibility by keyboard navigation, thanks to @westonruter code contribution.
|
2021-03-16 19:41:08 +00:00
|
|
|
|
* - Adding: Reference container: get expanding and collapsing to work also in AMP compatibility mode, thanks to @westonruter code contribution.
|
|
|
|
|
*
|
|
|
|
|
* @contributor @milindmore22
|
|
|
|
|
* @link @link https://github.com/ampproject/amp-wp/issues/5913#issuecomment-785306933
|
|
|
|
|
*
|
|
|
|
|
* @contributor @westonruter
|
|
|
|
|
* @link https://github.com/ampproject/amp-wp/issues/5913#issuecomment-785419655
|
|
|
|
|
* @link https://github.com/markcheret/footnotes/issues/48#issuecomment-799580854
|
|
|
|
|
* @link https://github.com/markcheret/footnotes/issues/48#issuecomment-799582394
|
2021-03-20 20:48:54 +00:00
|
|
|
|
*
|
2021-03-21 19:19:04 +00:00
|
|
|
|
* @since 2.5.11 (draft)
|
2021-03-27 06:10:08 +00:00
|
|
|
|
* @since 2.6.0 (release)
|
2021-03-20 20:48:54 +00:00
|
|
|
|
* @var str
|
2021-03-16 19:41:08 +00:00
|
|
|
|
*/
|
|
|
|
|
const C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE = 'footnotes_inputfield_amp_compatibility_enable';
|
|
|
|
|
|
2021-03-20 20:48:54 +00:00
|
|
|
|
/**
|
|
|
|
|
* Settings container key for scroll duration asymmetricity.
|
|
|
|
|
*
|
|
|
|
|
* @since 2.5.11
|
|
|
|
|
* @var str
|
|
|
|
|
*/
|
|
|
|
|
const C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY = 'footnotes_inputfield_scroll_duration_asymmetricity';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Settings container key for scroll down duration.
|
|
|
|
|
*
|
|
|
|
|
* @since 2.5.11
|
|
|
|
|
* @var int
|
|
|
|
|
*/
|
|
|
|
|
const C_INT_FOOTNOTES_SCROLL_DOWN_DURATION = 'footnotes_inputfield_scroll_down_duration';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Settings container key for scroll down delay.
|
|
|
|
|
*
|
|
|
|
|
* @since 2.5.11
|
|
|
|
|
* @var int
|
|
|
|
|
*/
|
|
|
|
|
const C_INT_FOOTNOTES_SCROLL_DOWN_DELAY = 'footnotes_inputfield_scroll_down_delay';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Settings container key for scroll up delay.
|
|
|
|
|
*
|
|
|
|
|
* @since 2.5.11
|
|
|
|
|
* @var int
|
|
|
|
|
*/
|
|
|
|
|
const C_INT_FOOTNOTES_SCROLL_UP_DELAY = 'footnotes_inputfield_scroll_up_delay';
|
|
|
|
|
|
2021-03-23 04:02:07 +00:00
|
|
|
|
/**
|
|
|
|
|
* Settings container key to set the solution of the input element label issue.
|
|
|
|
|
*
|
|
|
|
|
* @since 2.5.12
|
|
|
|
|
* @var str
|
|
|
|
|
* If hard links are not enabled, clicking a referrer in an input element label
|
|
|
|
|
* toggles the state of the input element the label is connected to.
|
|
|
|
|
* Beside hard links, other solutions include moving footnotes off the label and
|
|
|
|
|
* append them, or disconnecting this label from the input element (discouraged).
|
|
|
|
|
* @link https://wordpress.org/support/topic/compatibility-issue-with-wpforms/#post-14212318
|
|
|
|
|
*/
|
|
|
|
|
const C_STR_FOOTNOTES_LABEL_ISSUE_SOLUTION = 'footnotes_inputfield_label_issue_solution';
|
2021-03-24 21:19:07 +00:00
|
|
|
|
|
2021-03-23 04:02:07 +00:00
|
|
|
|
/**
|
|
|
|
|
* Settings container key to enable CSS smooth scrolling.
|
2021-03-24 21:19:07 +00:00
|
|
|
|
*
|
2021-03-23 04:02:07 +00:00
|
|
|
|
* - Update: Scrolling: CSS-based smooth scroll behavior (optional), thanks to @paulgpetty and @bogosavljev issue reports.
|
2021-03-24 21:19:07 +00:00
|
|
|
|
*
|
2021-03-23 04:02:07 +00:00
|
|
|
|
* @reporter @paulgpetty
|
|
|
|
|
* @link https://wordpress.org/support/topic/functionally-great/#post-13607795
|
2021-03-24 21:19:07 +00:00
|
|
|
|
*
|
2021-03-23 04:02:07 +00:00
|
|
|
|
* @reporter @bogosavljev
|
|
|
|
|
* @link https://wordpress.org/support/topic/compatibility-issue-with-wpforms/#post-14214720
|
2021-03-24 21:19:07 +00:00
|
|
|
|
*
|
2021-03-23 04:02:07 +00:00
|
|
|
|
* @since 2.5.12
|
|
|
|
|
* Native smooth scrolling only works in recent browsers.
|
|
|
|
|
*/
|
|
|
|
|
const C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING = 'footnotes_inputfield_css_smooth_scrolling';
|
|
|
|
|
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
2021-03-15 20:03:16 +00:00
|
|
|
|
* SETTINGS STORAGE.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Stores a singleton reference of this class.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @var MCI_Footnotes_Settings
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
private static $a_obj_instance = null;
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Contains all Settings Container names.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @var array
|
|
|
|
|
*
|
2021-03-03 18:58:03 +00:00
|
|
|
|
* Edited.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* 2.2.2 added tab for Custom CSS 2020-12-15T0740+0100
|
|
|
|
|
*
|
|
|
|
|
* These are the storage container names, one per dashboard tab.
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
private $a_arr_container = array(
|
|
|
|
|
'footnotes_storage',
|
|
|
|
|
'footnotes_storage_custom',
|
|
|
|
|
'footnotes_storage_expert',
|
|
|
|
|
'footnotes_storage_custom_css',
|
2021-03-02 03:09:34 +00:00
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Contains all Default Settings for each Settings Container.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @var array
|
|
|
|
|
*
|
2021-03-15 19:37:41 +00:00
|
|
|
|
* Comments are moved to constant docblocks.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
private $a_arr_default = array(
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
// General settings.
|
|
|
|
|
'footnotes_storage' => array(
|
|
|
|
|
|
2021-03-16 19:41:08 +00:00
|
|
|
|
// AMP compatibility.
|
|
|
|
|
self::C_STR_FOOTNOTES_AMP_COMPATIBILITY_ENABLE => '',
|
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
// Footnote start and end short codes.
|
|
|
|
|
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_FOOTNOTE_SHORTCODE_SYNTAX_VALIDATION_ENABLE => 'yes',
|
|
|
|
|
|
|
|
|
|
// Footnotes numbering.
|
|
|
|
|
self::C_STR_FOOTNOTES_COUNTER_STYLE => 'arabic_plain',
|
|
|
|
|
self::C_STR_COMBINE_IDENTICAL_FOOTNOTES => 'yes',
|
|
|
|
|
|
|
|
|
|
// Scrolling behavior.
|
2021-03-23 04:02:07 +00:00
|
|
|
|
self::C_STR_FOOTNOTES_CSS_SMOOTH_SCROLLING => 'no',
|
2021-03-15 19:37:41 +00:00
|
|
|
|
self::C_INT_FOOTNOTES_SCROLL_OFFSET => 20,
|
|
|
|
|
self::C_INT_FOOTNOTES_SCROLL_DURATION => 380,
|
2021-03-20 20:48:54 +00:00
|
|
|
|
self::C_STR_FOOTNOTES_SCROLL_DURATION_ASYMMETRICITY => 'no',
|
|
|
|
|
self::C_INT_FOOTNOTES_SCROLL_DOWN_DURATION => 150,
|
|
|
|
|
self::C_INT_FOOTNOTES_SCROLL_DOWN_DELAY => 0,
|
|
|
|
|
self::C_INT_FOOTNOTES_SCROLL_UP_DELAY => 0,
|
2021-03-15 19:37:41 +00:00
|
|
|
|
self::C_STR_FOOTNOTES_HARD_LINKS_ENABLE => 'no',
|
|
|
|
|
self::C_STR_REFERRER_FRAGMENT_ID_SLUG => 'r',
|
|
|
|
|
self::C_STR_FOOTNOTE_FRAGMENT_ID_SLUG => 'f',
|
|
|
|
|
self::C_STR_HARD_LINK_IDS_SEPARATOR => '+',
|
|
|
|
|
self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_ENABLE => 'yes',
|
|
|
|
|
self::C_STR_FOOTNOTES_BACKLINK_TOOLTIP_TEXT => 'Alt+ ←',
|
|
|
|
|
|
|
|
|
|
// Reference container.
|
|
|
|
|
self::C_STR_REFERENCE_CONTAINER_NAME => 'References',
|
|
|
|
|
self::C_STR_REFERENCE_CONTAINER_LABEL_ELEMENT => 'p',
|
|
|
|
|
self::C_STR_REFERENCE_CONTAINER_LABEL_BOTTOM_BORDER => 'yes',
|
|
|
|
|
self::C_STR_REFERENCE_CONTAINER_COLLAPSE => 'no',
|
|
|
|
|
self::C_STR_FOOTNOTES_REFERENCE_CONTAINER_SCRIPT_MODE => 'jquery',
|
|
|
|
|
self::C_STR_REFERENCE_CONTAINER_POSITION => 'post_end',
|
|
|
|
|
self::C_STR_REFERENCE_CONTAINER_POSITION_SHORTCODE => '[[references]]',
|
|
|
|
|
self::C_STR_REFERENCE_CONTAINER_START_PAGE_ENABLE => 'yes',
|
|
|
|
|
self::C_INT_REFERENCE_CONTAINER_TOP_MARGIN => 24,
|
|
|
|
|
self::C_INT_REFERENCE_CONTAINER_BOTTOM_MARGIN => 0,
|
|
|
|
|
self::C_STR_FOOTNOTES_PAGE_LAYOUT_SUPPORT => 'none',
|
|
|
|
|
self::C_STR_FOOTNOTE_URL_WRAP_ENABLED => 'yes',
|
|
|
|
|
self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_ENABLE => 'yes',
|
|
|
|
|
self::C_STR_REFERENCE_CONTAINER_BACKLINK_SYMBOL_SWITCH => 'no',
|
|
|
|
|
self::C_STR_REFERENCE_CONTAINER_3COLUMN_LAYOUT_ENABLE => 'no',
|
|
|
|
|
self::C_STR_REFERENCE_CONTAINER_ROW_BORDERS_ENABLE => 'no',
|
|
|
|
|
|
|
|
|
|
self::C_STR_BACKLINKS_SEPARATOR_ENABLED => 'yes',
|
|
|
|
|
self::C_STR_BACKLINKS_SEPARATOR_OPTION => 'comma',
|
|
|
|
|
self::C_STR_BACKLINKS_SEPARATOR_CUSTOM => '',
|
|
|
|
|
|
|
|
|
|
self::C_STR_BACKLINKS_TERMINATOR_ENABLED => 'no',
|
|
|
|
|
self::C_STR_BACKLINKS_TERMINATOR_OPTION => 'full_stop',
|
|
|
|
|
self::C_STR_BACKLINKS_TERMINATOR_CUSTOM => '',
|
|
|
|
|
|
|
|
|
|
self::C_STR_BACKLINKS_COLUMN_WIDTH_ENABLED => 'no',
|
|
|
|
|
self::C_INT_BACKLINKS_COLUMN_WIDTH_SCALAR => '50',
|
|
|
|
|
self::C_STR_BACKLINKS_COLUMN_WIDTH_UNIT => 'px',
|
|
|
|
|
|
|
|
|
|
self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_ENABLED => 'no',
|
|
|
|
|
self::C_INT_BACKLINKS_COLUMN_MAX_WIDTH_SCALAR => '140',
|
|
|
|
|
self::C_STR_BACKLINKS_COLUMN_MAX_WIDTH_UNIT => 'px',
|
|
|
|
|
|
|
|
|
|
self::C_STR_BACKLINKS_LINE_BREAKS_ENABLED => 'no',
|
|
|
|
|
self::C_STR_LINK_ELEMENT_ENABLED => 'yes',
|
|
|
|
|
|
|
|
|
|
// Footnotes in excerpts.
|
2021-03-31 00:49:17 +00:00
|
|
|
|
self::C_STR_FOOTNOTES_IN_EXCERPT => 'yes',
|
2021-03-15 19:37:41 +00:00
|
|
|
|
|
|
|
|
|
// Footnotes love.
|
|
|
|
|
self::C_STR_FOOTNOTES_LOVE => 'no',
|
|
|
|
|
|
|
|
|
|
// Deprecated.
|
|
|
|
|
self::C_STR_FOOTNOTES_EXPERT_MODE => 'yes',
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
// Referrers and tooltips.
|
|
|
|
|
'footnotes_storage_custom' => array(
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
// Backlink symbol.
|
|
|
|
|
self::C_STR_HYPERLINK_ARROW => '↑',
|
|
|
|
|
self::C_STR_HYPERLINK_ARROW_USER_DEFINED => '',
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-23 04:02:07 +00:00
|
|
|
|
// Referrers.
|
2021-03-15 19:37:41 +00:00
|
|
|
|
self::C_STR_FOOTNOTES_REFERRER_SUPERSCRIPT_TAGS => 'yes',
|
|
|
|
|
self::C_STR_FOOTNOTE_REFERRERS_NORMAL_SUPERSCRIPT => 'no',
|
|
|
|
|
self::C_STR_FOOTNOTES_STYLING_BEFORE => '[',
|
|
|
|
|
self::C_STR_FOOTNOTES_STYLING_AFTER => ']',
|
2021-03-24 21:19:07 +00:00
|
|
|
|
|
2021-03-23 04:02:07 +00:00
|
|
|
|
// Referrers in labels.
|
|
|
|
|
self::C_STR_FOOTNOTES_LABEL_ISSUE_SOLUTION => 'none',
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
// Tooltips.
|
|
|
|
|
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ENABLED => 'yes',
|
|
|
|
|
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_ALTERNATIVE => 'no',
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
// Tooltip position.
|
|
|
|
|
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_POSITION => 'top center',
|
2021-03-02 03:09:34 +00:00
|
|
|
|
self::C_STR_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_POSITION => 'top right',
|
2021-03-15 19:37:41 +00:00
|
|
|
|
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_X => 0,
|
2021-03-02 03:09:34 +00:00
|
|
|
|
self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_X => -50,
|
2021-03-15 19:37:41 +00:00
|
|
|
|
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_OFFSET_Y => -7,
|
2021-03-03 18:58:03 +00:00
|
|
|
|
self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_OFFSET_Y => 24,
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
// Tooltip dimensions.
|
|
|
|
|
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_MAX_WIDTH => 450,
|
|
|
|
|
self::C_INT_FOOTNOTES_ALTERNATIVE_MOUSE_OVER_BOX_WIDTH => 400,
|
|
|
|
|
|
|
|
|
|
// Tooltip timing.
|
|
|
|
|
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 truncation.
|
|
|
|
|
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_ENABLED => 'yes',
|
|
|
|
|
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_EXCERPT_LENGTH => 200,
|
|
|
|
|
self::C_STR_FOOTNOTES_TOOLTIP_READON_LABEL => 'Continue reading',
|
|
|
|
|
|
|
|
|
|
// Tooltip text.
|
|
|
|
|
self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_DELIMITER => '[[/tooltip]]',
|
|
|
|
|
self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_ENABLE => 'no',
|
|
|
|
|
self::C_STR_FOOTNOTES_TOOLTIP_EXCERPT_MIRROR_SEPARATOR => ' — ',
|
|
|
|
|
|
|
|
|
|
// Tooltip appearance.
|
|
|
|
|
self::C_STR_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',
|
|
|
|
|
|
2021-03-27 06:10:08 +00:00
|
|
|
|
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_COLOR => '#000000',
|
|
|
|
|
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BACKGROUND => '#ffffff',
|
2021-03-15 19:37:41 +00:00
|
|
|
|
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_WIDTH => 1,
|
|
|
|
|
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_BORDER_COLOR => '#cccc99',
|
|
|
|
|
self::C_INT_FOOTNOTES_MOUSE_OVER_BOX_BORDER_RADIUS => 0,
|
|
|
|
|
self::C_STR_FOOTNOTES_MOUSE_OVER_BOX_SHADOW_COLOR => '#666666',
|
|
|
|
|
|
|
|
|
|
// Your existing Custom CSS code.
|
|
|
|
|
self::C_STR_CUSTOM_CSS => '',
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
),
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
// Scope and priority
|
|
|
|
|
'footnotes_storage_expert' => array(
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
// WordPress hooks with priority level.
|
|
|
|
|
self::C_STR_EXPERT_LOOKUP_THE_TITLE => '',
|
|
|
|
|
self::C_INT_EXPERT_LOOKUP_THE_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
self::C_STR_EXPERT_LOOKUP_THE_CONTENT => 'checked',
|
|
|
|
|
self::C_INT_EXPERT_LOOKUP_THE_CONTENT_PRIORITY_LEVEL => 98,
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-31 00:49:17 +00:00
|
|
|
|
self::C_STR_EXPERT_LOOKUP_THE_EXCERPT => 'checked',
|
2021-03-15 19:37:41 +00:00
|
|
|
|
self::C_INT_EXPERT_LOOKUP_THE_EXCERPT_PRIORITY_LEVEL => PHP_INT_MAX,
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
self::C_STR_EXPERT_LOOKUP_WIDGET_TITLE => '',
|
|
|
|
|
self::C_INT_EXPERT_LOOKUP_WIDGET_TITLE_PRIORITY_LEVEL => PHP_INT_MAX,
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
self::C_STR_EXPERT_LOOKUP_WIDGET_TEXT => '',
|
|
|
|
|
self::C_INT_EXPERT_LOOKUP_WIDGET_TEXT_PRIORITY_LEVEL => 98,
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
// Custom CSS.
|
|
|
|
|
'footnotes_storage_custom_css' => array(
|
|
|
|
|
|
|
|
|
|
// Your existing Custom CSS code.
|
|
|
|
|
self::C_STR_CUSTOM_CSS_LEGACY_ENABLE => 'yes',
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-15 19:37:41 +00:00
|
|
|
|
// Custom CSS.
|
|
|
|
|
self::C_STR_CUSTOM_CSS_NEW => '',
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Contains all Settings from each Settings container as soon as this class is initialized.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
private $a_arr_settings = array();
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class Constructor. Loads all Settings from each WordPress Settings container.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
*/
|
|
|
|
|
private function __construct() {
|
2021-03-03 18:58:03 +00:00
|
|
|
|
$this->load_all();
|
2021-03-02 03:09:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns a singleton of this class.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
* @return MCI_Footnotes_Settings
|
|
|
|
|
*/
|
|
|
|
|
public static function instance() {
|
2021-03-03 18:58:03 +00:00
|
|
|
|
// No instance defined yet, load it.
|
|
|
|
|
if ( ! self::$a_obj_instance ) {
|
|
|
|
|
self::$a_obj_instance = new self();
|
2021-03-02 03:09:34 +00:00
|
|
|
|
}
|
2021-03-03 18:58:03 +00:00
|
|
|
|
// Return a singleton of this class.
|
|
|
|
|
return self::$a_obj_instance;
|
2021-03-02 03:09:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the name of a specified Settings Container.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
2021-03-03 18:58:03 +00:00
|
|
|
|
* @param int $p_int_index Settings Container Array Key Index.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @return str Settings Container name.
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
public function get_container( $p_int_index ) {
|
|
|
|
|
return $this->a_arr_container[ $p_int_index ];
|
2021-03-02 03:09:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the default values of a specific Settings Container.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.5.6
|
2021-03-03 18:58:03 +00:00
|
|
|
|
* @param int $p_int_index Settings Container Aray Key Index.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @return array
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
public function get_defaults( $p_int_index ) {
|
|
|
|
|
return $this->a_arr_default[ $this->a_arr_container[ $p_int_index ] ];
|
2021-03-02 03:09:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Loads all Settings from each Settings container.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
private function load_all() {
|
|
|
|
|
// Clear current settings.
|
|
|
|
|
$this->a_arr_settings = array();
|
|
|
|
|
$num_settings = count( $this->a_arr_container );
|
|
|
|
|
for ( $i = 0; $i < $num_settings; $i++ ) {
|
|
|
|
|
// Load settings.
|
|
|
|
|
$this->a_arr_settings = array_merge( $this->a_arr_settings, $this->load( $i ) );
|
2021-03-02 03:09:34 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2021-03-27 06:10:08 +00:00
|
|
|
|
* Loads all settings from specified settings container.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
*
|
2021-03-27 06:10:08 +00:00
|
|
|
|
* - Bugfix: Removed the 'trim' function to allow leading and trailing whitespace in settings text boxes, thanks to @compasscare bug report.
|
|
|
|
|
*
|
|
|
|
|
* @reporter @compasscare
|
|
|
|
|
* @link https://wordpress.org/support/topic/leading-space-in-footnotes-tag/
|
|
|
|
|
*
|
|
|
|
|
* @since 1.5.2
|
|
|
|
|
* @param int $p_int_index Settings container array key index.
|
|
|
|
|
* @return array Settings loaded from defaults if container is empty (first usage).
|
2021-03-02 03:09:34 +00:00
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
private function load( $p_int_index ) {
|
|
|
|
|
// Load all settings from container.
|
|
|
|
|
$l_arr_options = get_option( $this->get_container( $p_int_index ) );
|
|
|
|
|
// Load all default settings.
|
|
|
|
|
$l_arr_default = $this->a_arr_default[ $this->get_container( $p_int_index ) ];
|
2021-03-02 03:09:34 +00:00
|
|
|
|
|
2021-03-03 18:58:03 +00:00
|
|
|
|
// No settings found, set them to their default value.
|
|
|
|
|
if ( empty( $l_arr_options ) ) {
|
|
|
|
|
return $l_arr_default;
|
2021-03-02 03:09:34 +00:00
|
|
|
|
}
|
2021-03-03 18:58:03 +00:00
|
|
|
|
// Iterate through all available settings ( = default values).
|
|
|
|
|
foreach ( $l_arr_default as $l_str_key => $l_str_value ) {
|
|
|
|
|
// Available setting not found in the container.
|
|
|
|
|
if ( ! array_key_exists( $l_str_key, $l_arr_options ) ) {
|
|
|
|
|
// Define the setting with its default value.
|
|
|
|
|
$l_arr_options[ $l_str_key ] = $l_str_value;
|
2021-03-02 03:09:34 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
2021-03-03 18:58:03 +00:00
|
|
|
|
// Return settings loaded from Container.
|
|
|
|
|
return $l_arr_options;
|
2021-03-02 03:09:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Updates a whole Settings container.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
2021-03-03 18:58:03 +00:00
|
|
|
|
* @param int $p_int_index Index of the Settings container.
|
|
|
|
|
* @param array $p_arr_new_values new Settings.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @return bool
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
public function save_options( $p_int_index, $p_arr_new_values ) {
|
|
|
|
|
if ( update_option( $this->get_container( $p_int_index ), $p_arr_new_values ) ) {
|
|
|
|
|
$this->load_all();
|
2021-03-02 03:09:34 +00:00
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the value of specified Settings name.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
2021-03-03 18:58:03 +00:00
|
|
|
|
* @param string $p_str_key Settings Array Key name.
|
2021-03-02 03:09:34 +00:00
|
|
|
|
* @return mixed Value of the Setting on Success or Null in Settings name is invalid.
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
public function get( $p_str_key ) {
|
|
|
|
|
return array_key_exists( $p_str_key, $this->a_arr_settings ) ? $this->a_arr_settings[ $p_str_key ] : null;
|
2021-03-02 03:09:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Deletes each Settings Container and loads the default values for each Settings Container.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
*
|
|
|
|
|
* Edit: This didn’t actually work.
|
|
|
|
|
* @since 2.2.0 this function is not called any longer when deleting the plugin,
|
|
|
|
|
* to protect user data against loss, since manually updating a plugin is safer
|
|
|
|
|
* done by deleting and reinstalling (see the warning about database backup).
|
|
|
|
|
* 2020-12-13T1353+0100
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
public function clear_all() {
|
|
|
|
|
// Iterate through each Settings Container.
|
|
|
|
|
$num_settings = count( $this->a_arr_container );
|
|
|
|
|
for ( $i = 0; $i < $num_settings; $i++ ) {
|
|
|
|
|
// Delete the settings container.
|
|
|
|
|
delete_option( $this->get_container( $i ) );
|
2021-03-02 03:09:34 +00:00
|
|
|
|
}
|
2021-03-03 18:58:03 +00:00
|
|
|
|
// Set settings back to the default values.
|
|
|
|
|
$this->a_arr_settings = $this->a_arr_default;
|
2021-03-02 03:09:34 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Register all Settings Container for the Plugin Settings Page in the Dashboard.
|
|
|
|
|
* Settings Container Label will be the same as the Settings Container Name.
|
|
|
|
|
*
|
|
|
|
|
* @since 1.5.0
|
|
|
|
|
*/
|
2021-03-03 18:58:03 +00:00
|
|
|
|
public function register_settings() {
|
|
|
|
|
// Register all settings.
|
|
|
|
|
$num_settings = count( $this->a_arr_container );
|
|
|
|
|
for ( $i = 0; $i < $num_settings; $i++ ) {
|
|
|
|
|
register_setting( $this->get_container( $i ), $this->get_container( $i ) );
|
2021-03-02 03:09:34 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|